Hi,
Please try the attached version.
we
have supported setting formulas that refer to row/column/parameters
count that exceeds Excel2003's limit.
Note: To
remove the limit of Excel2003 for row, column and parameters count, please set
the file format of Workbook other than EXCEL97TO2003.
Sample Code Segments:
1)
Workbook workbook = new Workbook();
Worksheets worksheets = workbook.getWorksheets();
Worksheet worksheet = worksheets.getSheet(0);
worksheet.getCells().getCell("B10").setFormula("=IW39");
System.out.println(worksheet.getCells().getCell("B10").getFormula());
2)
Workbook wb = new Workbook();
wb.setFileFormatType(FileFormatType.EXCEL2007);
Cells cells = wb.getWorksheets().getSheet(0).getCells();
Cell cell = cells.getCell(0, 0);
cell.setFormula("=IW39");
cell = cells.getCell(0, 1);
cell.setFormula("=SUM(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,34,45,67,76,87,98,77,8,9,100)");
//... your code goes here.
wb.save("d:\\files\\res.xlsx"); //or wb.save("res.xlsx", FileFormatType.EXCEL2007);
The
Workbook.save(String) and Workbook.save(InputStream) methods are different from now on. If the workbook's file format has been
set (If the workbook is loaded from a template file, its file format would be the same as the template file's format. Or it can be set by Workbook.setFileFormatType(int) method), saving
the workbook without specifying file format type will generate the
resultant file with the Workbook's original file format.
Thanks for your understanding and hopefully this fix would fulfill your requirement.
Amjad Sahi
Support Developer,
Aspose Sialkot Team
Contact Us