Loading Multiple Files
In Univer, you can load multiple spreadsheets (Workbooks), allowing you to perform cross-workbook formula calculations and freely switch between the workbooks to display.
To load a workbook and set it as the currently rendered workbook, you can do the following:
const fworkbook1 = univerAPI.createWorkbook({ id: 'workbook1', /* other fields */ });
If you only want to load a workbook but do not wish to set it as the currently rendered workbook, you can do this:
const fworkbook2 = univerAPI.createWorkbook({ id: 'workbook2', /* other fields */ }, {
makeCurrent: false
});
You can also switch between the workbooks to display at any time. For example, to set the just-loaded workbook2
as the currently displayed workbook:
univerAPI.setCurrent('workbook2');
Last updated on