We were unable to load Disqus. If you are a moderator please see our troubleshooting guide.

Ashish • 2 years ago

i want to import to work for both xls and xlsx . But when i compiled solution with 64 , 86 ,any cpu, it works for only one extension ( only xls or xlsx)

Mark Flayd • 3 years ago

Very interesting article! If you need any help you can use ZetExcel.com. It is very helpful

Steven Peterson • 4 years ago

You can try https://zetexcel.com/. it has the ability to generate, modify, convert, render and print spreadsheets without using Microsoft Excel.

Phil Kiba • 5 years ago

Programming SDK from (https://zetexcel.com/). This is very useful for developing high-performance applications to create,
edit, convert or print excel spreadsheet file formats without requiring Microsoft. you can try.

Adam Fletcher • 5 years ago

You can try ZetExcel.com If you need Excel generation functionality for your .net application.

The Thinker • 5 years ago

A few observations:

1. There is faster way to read data. I experimented with reading from .CSV file, and found it at least 2 times faster. Of course, you need to take care of "escaped" characters, such as comma and double quotation mark. You also need to eliminate double quotation marks surrounding some fields. And, depending on the way you read the file, you might need to replace "\n" with "\r\n".

2. I observed faster reading when full file path is specified.

3. Close Excel if your file is opened in Excel. Otherwise you will get an exception. Sometimes closing Excel is not enough. You need to kill it using Task Manager.

4. Code below lists all the Excel worksheets.
List<string> tabs = new List<string>();
foreach (DataRow row in schema.Rows)
if (row["TABLE_NAME"].ToString().EndsWith("$"))
tabs.Add(row["TABLE_NAME"].ToString());

The Thinker • 5 years ago

Thank you!
Best article on the subject I could find.