Subject: Creating an Excel Table... ListObject Class doesn't exist in 7.0.40.226
Date: 2020-06-05 21:47:28
From: Chris Slattery
Source: creating-excel-table-listobject-class-doesn-t-exist-7-0-40-226
----------------------------------------------------------------------

How can I create an Excel table in version 7.0.40.226.

                WorkbookManager wbm = new WorkbookManager();
                Workbook wb = wbm.Workbooks.Add(ExcelVersion.Excel2016);

                IWorksheet sheet = (Worksheet)wb.Worksheets[0];

                sheet.ImportDataTable(dt, true, 1, 1);
                sheet.Columns[9].CellStyle.NumberFormat = "0.00";

                Range r = new Range(wbm, sheet, 1, 100, 1, 200);

                sheet.ListObjects.Add(new ListObject("Journal", r, 0)); //problem is here
                wb.SaveAs(filename);
                wb.Close();

Thank you.

----------------------------------------------------------------------

Note: This question has been asked on the Q&A forum of Thang Dang's fraudulent ComponentPro brand
If you purchased anything from ComponentPro, you have been scammed. Contact the payment processor
who sold you the license and ask for your money back.

Back to ComponentPro Q&A Forum Index