4 sentences of code read from Excel to DataSet (non-Excel component)

Source: Internet
Author: User
Toxy is another project promoted after NPOI. It aims to solve the document extraction problem. It supports all docx, xlsx, xls, csv, and vcard formats. The following is a simple but useful example.
ParserContext c = new ParserContext (@ "d: \ demo.xls"); var parser = ParserFactory. createSpreadsheet (c); var spreadsheet = parser. parse (); DataSet ds = spreadsheet. toDataSet ();

Here is the legendary code that can directly convert an Excel Workbook into a DataSet! CreateSpreadsheet supports xls and xlsx, so you do not need to worry about this issue. In addition to converting Workbook to DataSet, Toxy also supports converting a table in Excel into a DataTable, because ToxyTable has a method called ToDataTable, and ToxySpreadsheet (equivalent to Excel workbook) it can contain multiple toxytables. With Toxy, it is easier to extract Excel data! References

Official website: toxy.codeplex.com
Http://blog.sina.com.cn/s/blog_701d1da40101h66g.htmlhttp://blog.sina.com.cn/s/blog_701d1da40101gi6m.html

4 sentences of code read from Excel to DataSet (non-Excel component)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.