update the table structure #4531
Labels
Area: Excel
Feedback on Excel content
Needs: author feedback
Waiting for author (creator) of Issue to provide more info
Status: no recent activity
Issue or PR is stale (no recent activity)
i have created a table by using the js api
code is
create: async (
columns: string[],
data: Record<string, TableCell>[],
metadata?: { [key: string]: any },
// range: number[] = []
) => {
return Excel.run(async context => {
const sheet = context.workbook.worksheets.getActiveWorksheet();
const selectedRange = context.workbook.getSelectedRange();
selectedRange.load('address');
await context.sync();
const userSelectedCell = splitCharAndNumber(selectedRange.address.split('!')[1]);
let cellRowPoint = userSelectedCell[1];
let cellColumnPoint = charToNumber(userSelectedCell[0]);
2.columns should be loaded according to the new data
updateTable: async (
newColumns: string[],
newData: Record<string, TableCell>[],
tableName: string,
metadata?: { [key: string]: any },
) => {
return Excel.run(async context => {
const sheet = context.workbook.worksheets.getActiveWorksheet();
The text was updated successfully, but these errors were encountered: