When fill data to Calc cells use UNO API (Java), it's take a lot time to re-calculate all formula related to the updated cell.
Is there any way temporary disable the screen update & the change the calculate mode from automatic to manual like MS Excel does.
Code: Select all
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
...
Application.ScreenUpdating = True
Application.Calculation = xlCalculationAutomatic
Code: Select all
XComponent xSpreadsheetComponent = xCompLoader.loadComponentFromURL(sLoadUrl, "_default", 0, loadProps);
XSpreadsheetDocument xDocument = (XSpreadsheetDocument)UnoRuntime.queryInterface(XSpreadsheetDocument.class,xSpreadsheetComponent);
XSpreadsheets xSheets = xDocument.getSheets();
Object oSheet = xSheets.getByName(sheet_Estimation);
XSpreadsheet xSheet = (XSpreadsheet)UnoRuntime.queryInterface(XSpreadsheet.class, oSheet);
rgColName = xSheet.getCellRangeByName("colName");
rgColName .getCellByPosition(x, y).setFormula("abc");
...