Hello,
I’m opening a Workbook and then saving it into output stream in HTML format to be shown in browser. It works correctly, but when it comes to formulas, then those are calculated and the result is shown instead of showing the formula itself.
For example I have sheet with two numbers and then formula:
1 2 =A1+A2
What is saved to output stream is:
1 2 3
What I need is:
1 2 =A1+A2
I looked at the API:
- com.aspose.cells.PdfSaveOptions#setCalculateFormula
- com.aspose.cells.HtmlSaveOptions does not have such method
Is there an option to have formulas themselves in cells when saving in HTML format?
Code excerpt:
Workbook wb = new Workbook(content);
HtmlSaveOptions saveOptions = new HtmlSaveOptions(SaveFormat.HTML);
saveOptions.setExportActiveWorksheetOnly(true);
saveOptions.setExpImageToTempDir(false);
saveOptions.setExportImagesAsBase64(true);
wb.getWorksheets().setActiveSheetIndex(sheetNumber);
wb.save(outputStream, saveOptions);