IUniverSpreadsheetConverter
Interface for managing spreadsheet data.
Provides methods to set/get data into/from an XLWorkbook using agent and userManager details, and optionally just populate data.
public interface IUniverSpreadsheetConverter
Remarks
This interface defines a contract for interacting with spreadsheet data using Univer’s spreadsheet model, allowing population or extraction of data from workbooks and worksheets with contextual support from agent and user manager instances.
Methods
SetInformationAsync
Task<XLWorkbook> SetInformationAsync(UniverSpreadsheetAgent agent, UniverUserManager userManager, SpreadsheetOptions options)
Setup spreadsheet data based on provided agent and userManager.
Parameters
Parameter | Type | Description |
---|---|---|
agent | UniverSpreadsheetAgent | Agent for setting up the workbook. |
userManager | UniverUserManager | User service for setting up the workbook. |
options | SpreadsheetOptions | Flags to select which data will be set. |
Returns
Task<XLWorkbook>
: A task that returns the configured workbook.
GetInformationInAgentAsync
Task GetInformationInAgentAsync(XLWorkbook excelWorkbook, UniverSpreadsheetAgent agent, UniverUserManager userManager, SpreadsheetOptions options)
Get data into a workbook using provided agent and worksheet.
Parameters
Parameter | Type | Description |
---|---|---|
excelWorkbook | XLWorkbook | Workbook containing source data for getting into an agent. |
agent | UniverSpreadsheetAgent | Agent for storing fetched data. |
userManager | UniverUserManager | User service for setting up the workbook. |
options | SpreadsheetOptions | Flags to select which data will be set. |
Returns
Task: Represents the asynchronous operation.
GetInformationInAgentAsync
Task GetInformationInAgentAsync(IXLWorksheet worksheet, UniverSpreadsheetAgent agent, UniverUserManager userManager, SpreadsheetOptions options)
Gets information into an agent from a worksheet (IXLWorksheet).
Parameters
Parameter | Type | Description |
---|---|---|
worksheet | IXLWorksheet | Worksheet containing source data for getting into an agent. |
agent | UniverSpreadsheetAgent | Agent for storing fetched data. |
userManager | UniverUserManager | User service for setting up the workbook. |
options | SpreadsheetOptions | Flags to select which data will be set. |
Returns
Task: Represents the asynchronous operation.
SetInformationInSheetAsync
Task SetInformationInSheetAsync(XLWorkbook workbook, USheetInfo unvrSheet, UniverSpreadsheetAgent agent, UniverUserManager userManager, SpreadsheetOptions options)
Sets spreadsheet data based on provided agent and userManager.
Parameters
Parameter | Type | Description |
---|---|---|
workbook | XLWorkbook | Workbook to put the sheet data. |
unvrSheet | USheetInfo | Data of the sheet (Univer) that will be read. |
agent | UniverSpreadsheetAgent | Univer’s agent. |
userManager | UniverUserManager | Univer’s user manager. |
options | SpreadsheetOptions | Flags to select which data will be set. |
Returns
Task: Represents the asynchronous operation.