I want to achieve the state of PrintPreview on opening a ODS file. (Exactly as you press on M.Excel / LibreOffice/ OpenOffice Calc on ribbon File->Print). I’ve researched on your forums and found 2 possible solutions but none of them seems to work at the moment:
- Workbook workbook = new Workbook(sourceDir + “Book1.xlsx”);
ImageOrPrintOptions imgOptions = new ImageOrPrintOptions();
WorkbookPrintingPreview preview = new WorkbookPrintingPreview(workbook, imgOptions);
SheetPrintingPreview preview2 = new SheetPrintingPreview(workbook.Worksheets[0], imgOptions);
// BUT don’t know how/where to use the instances preview or preview2
-
would be using SheetRender or WorkbookRender instances but then I have to select/use the printerName and I don’t need\want to specify the printer
I saw a very simple and useful solution on Aspose Words at: https://docs.aspose.com/words/net/display-documents-in-print-preview/ but nothing similar on Aspose.Cells. For sure you have a simple solution for this easy task