Hi Aspose Team,
Once again need help from your side :)
I am using Java 1.6 and Aspose cell 8.2.5.jar. Whiel my cell have data more that 32k, its throwing exception
com.aspose.cells.CellsException: You want to put a string longer than 32K to Cell B5. MS Excel only allows to put a string shorter than 32K to a Cell
So I got one solution on your forum as like need to set CheckExcelRestriction to false.
LoadOptions options = new LoadOptions();
options.setCheckExcelRestriction(false);
Workbook excel = new Workbook("D:\\ASPOSE\\A.xlsx", options);
Cells cells = excel.getWorksheets().get(0).getCells();
//Put a string into a cell
Cell cell = cells.get(0, 0);
StringBuilder sb = new StringBuilder(33000);
for (int i = 0; i < 33000; i++)
sb.append("x");
String longVal = sb.toString();
cell.putValue(longVal);
// cell.putValue("Hello");
System.out.println(cell.getStringValue());
excel.save("D:\\ASPOSE\\A.xlsx");
If I run above code , I am not getting any exception but if I tried to open excel sheet getting popup like "Excel found unreadable content in A.xlsx. Do you want to recover the content of this workbook?" If I click Yes, then cell having that data but data length is 32768 not 33000.
Kindly find the attached A.xlsx file.
Please guide to get proper data without any excel opening issue.
Thanks in advance