Maximum column 256 work around

Is there a work around for the excel limit for maximum column count of 256?

Hi,

Well, MS Excel (97-2003.....xls format) has the capacity and we can have only 256 columns and 65536 rows in a worksheet. But if you save your workbook in .xlsx format (MS Excel 2007), it extends the column limit as MS Excel 2007 supports to fill 16383 columns and 1048575 rows in a worksheet, so you may save the excel file in .xlsx format. Aspose.Cells support MS Excel 2007 .xlsx format, so you can use it.

e.g..,

Workbook workbook =new Workbook();
Worksheet worksheet = workbook.Worksheets[0];
Cells cells = worksheet.Cells;
cells.Merge(0, 248, 1, 100);
cells[0,248].PutValue("Hello World!");
cells[1048575,16383].PutValue("Last Cell");
workbook.Save("f:\\test\\newrowscols.xlsx",FileFormatType.Excel2007Xlsx);

Thank you.