Posted 4 November 2026, 9:20 am EST
Hello Enrique,
Thank you for sharing the code. Your use case is clearer now.
Yes, C1Excel is conceptually similar to libraries such as EPPlus or NPOI. Instead of treating Excel as a database using OleDbCommand, you work directly with a workbook, worksheets, and cells.
In your current code, for example:
- CREATE TABLE [LIQUIDATIONS_0] creates an Excel worksheet.
- INSERT INTO … adds data to that worksheet.
With C1Excel, the equivalent approach would be to create an C1XLBook, add a worksheet for each LIQUIDATIONS_x section, write the column headers and DataTable values directly into cells, and then save the workbook as an .xls file.
C1Excel supports creating and saving .xls workbooks without requiring the ACE OLEDB provider.
Please refer to the attached sample for your reference. (see ExcelExport_Sample.zip)
Regards,
Uttkarsh.