We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Issue with the number of columns in the excel report

Hi,

I have data of 600 columns but in the excel report I have generated through Aspose , I am able to see the data upto 255 columns (upto Column IV) . Is there any column limit in Aspose …? . I am attaching the sample report . Please suggest me.

Hi Kishore,

Thanks for your posting and using Aspose.Cells.

Since, you are saving your report in XLS format, therefore you are getting 255 columns. XLS format only supports 255 columns so you should save your report in XLSX format which supports around 16384 columns.

So, please save your report in XLSX format and your issue should be fixed with it. Let us know if you encounter any problem, we will look into it and help you asap.

Hi,

Thanks for the response . I tried using the XLSX format but i am not able to open the report generated . Please find the attached report. Even I tried using below option also .

wb.Save("C:\\test2\\Book2.xlsx", SaveFormat.XLSX);

Hi,

Thanks for your posting and using Aspose.Cells.

Please download and try the latest version: Aspose.Cells for Java 8.3.1 and see if resolves your issue.

If your issue still persists, then please provide us your runnable sample code replicating this issue so that we could investigate this issue at our end and help you asap.

Hi,

We are using aspose.cells.8.1.1.4.jar . Please find the below code .

Workbook workbook=new Workbook();

String sheetName ="Page1";

WorksheetCollection worksheets = workbook.getWorksheets();

// Check if the worksheet is already existing or not

Worksheet sheet = worksheets.get(sheetName);

if (sheet == null) {

sheet = worksheets.add(sheetName);

}

if(sheetName!=null)

{

sheet.setName(sheetName.trim());

}

Cells cells = sheet.getCells();

cells.get(1, 1).setValue("Hi");

cells.get(2, 1).setValue("Hello");

workbook.save("C:/Aspose/ReportResult_2014-12-17_03_15_00.xlsx");

Hi,


Please try our latest version/fix: Aspose.Cells for Java 8.3.1 it works fine.

I have tested your sample code, the output file generated by Aspose.Cells for Java v8.3.1 opens fine into Ms Excel, I have also attached the output file for your reference.
e.g
Sample code:

Workbook workbook=new Workbook();

String sheetName =“Page1”;

WorksheetCollection worksheets = workbook.getWorksheets();

// Check if the worksheet is already existing or not

Worksheet sheet = worksheets.get(sheetName);

if (sheet == null) {

sheet = worksheets.add(sheetName);

}

if(sheetName!=null)

{

sheet.setName(sheetName.trim());

}

Cells cells = sheet.getCells();

cells.get(1, 1).setValue(“Hi”);

cells.get(2, 1).setValue(“Hello”);

workbook.save(“outReportResult_2014-12-17_03_15_001.xlsx”);


Thank you.

Hi,

I have tried with the aspose-cells-8.3.1.jar but I am still facing the same issue . Please find the attachment.

Hi,


Well, it is really strange that your generated file is not fine. Please make sure that you are using latest version v8.3.1 in your project which should be added to your classpath with its dependency jar file (i.e., aspose-cells-8.3.1.jar and bcprov-jdk15-146.jar files should be set into your classpath). Could you try my sample code (in my previous post) in a simple and separate console JAVA program with v8.3.1 and generate the output file and attach the file. Also paste or attach the .java file here, we will check it soon.

Thank you.