Hi, if you are also interested in commercial solutions, check out GemBox.Spreadsheet .NET Excel component. With it you can easily do chunked exports to Excel, or export DataTable to Excel.
gg4237
Posts
-
Export records to excel from sql -
EXCEL.EXE is not getting killedIf you don't want to bother with this kind of problems in managed world, you should take a look at GemBox.Spreadsheet .NET Excel library. It is lightweight library for reading and writing XLS, XLSX, ODS, CSV and HTML files, and it doesn't use Excel Interop.
-
excel problemHi, See this Excel Help forum thread: http://www.excelforum.com/excel-programming/377761-adodb-is-unable-to-copy-more-than-255-chars-in-excel-cell.html[^] But to completely avoid this kind of issues, I recommend you try GemBox.Spreadsheet .NET Excel component for reading and writing XLS, XLSX, ODS, CSV and HTML files. It uses it's own engine to parse and write Excel files, and because of that it is 250x faster that Excel Interop and it doesn't have interoperability issues like Jet OleDb drivers for Excel.
-
Interop ExcelHi, If you are building enterprise application you shouldn't use Excel Interop. Check out GemBox.Spreadsheet .NET Excel component for reading and writing XLS, XLSX, ODS, CSV and HTML files. Here is an example how to hide or delete column:
ExcelFile ef = new ExcelFile();
// Loads Excel file.
ef.LoadXls("filename.xls");// Selects first worksheet.
ExcelWorksheet ws = ef.Worksheets[0];// Hides first column.
ws.Columns[0].Hidden = true;//Deletes second column.
ws.Columns[1].Delete(); -
Interop ExcelHi, maybe you should check out GemBox.Spreadsheet .NET Excel component for reading and writing XLS, XLSX, ODS, CSV and HTML files. Here is an example code how to set border for specified cells:
ExcelFile ef = new ExcelFile();
// Loads Excel file.
ef.LoadXls("filename.xls");// Selects first worksheet.
ExcelWorksheet ws = ef.Worksheets[0];// Set border for selected cells.
cr = ws.Cells.GetSubrange("I2", "L8");
cr.SetBorders(MultipleBorders.Outside, Color.Navy, LineStyle.Dashed); -
about regular expression validation\d{2}|\d{11} Regex cheatsheet link
-
Interop ExcelIf your web app is for a couple of users, then Excel Interop might work, but check out if Excel is installed on server. But for other scenarios, don't use Excel Interop on server side. It scales bad and uses server's resources intensively. Also Excel Interop has other issues. If your dynamically generated HTML table is generated from GridView you could try GemBox.Spreadsheet .NET Excel component to export it to Excel because it is directly supported. Here is an example how to export DataGrid to Excel and how to export DataTable to Excel with GemBox.Spreadsheet component.
-
Problem with opening excel in Vb.net 2005Here is an excellent link with tips for Excel Automation from .NET. But my suggestion is not to use Excel Automation. For detailed explanation check Excel Interop issues. Try to find some 3rd party library that best suites your needs. I use GemBox.Spreadsheet library for reading and writing Excel files for some time now and it is great. It is very fast and easy to use.
-
Excel + C#Hi, Easiest and fastest way to deal with Excel in C# is by using 3rd party component. It's much faster and easier way then Excel Interop. Try using GemBox Excel component for .NET- component is free for commercial use but with limit of 150 rows. Here you can see a list of reason why GemBox.Spreadsheet is much better tool to work with Excel then Excel Interop.
-
problem reading an Excel fileTry with GemBox Excel .NET component. I've been using it for some time to work with Excel files and it's much better then using Excel Interop.
-
xls File ParserHi, for reading and writing Excel file you can try to use GemBox spreadsheet component. It is very easy to use.