Parse json directly inside Excel on the web using Office Script

preview_player
Показать описание
In this video, we will passe json to Excel online using Power Automate then parse it inside Excel on the web.
We will fill two identical Tables with parsed json using two methods and compare execution speed.
Enjoy
Рекомендации по теме
Комментарии
Автор

I was looking for same,
thank you sir !

princepabari
Автор

Can you put date and time in the interface? or I need to convert it to serial number?

michaelangelopagara
Автор

i am getting error "Worksheet getRange: Timeout" if i have more than 50 items.

mouhammadwahip
Автор

function main(workbook: ExcelScript.Workbook, jsonData : string) {

console.log(jsonData);
let mySheet = workbook.getWorksheets()[0];
let myTable = mySheet.getTables()[0];
let payoffJson : IPayoff[] = JSON.parse(jsonData) as IPayoff[];
let count = 2;
try
{

const tableValues = payoffJson.map(row => [row["Loan Number"], row["Mail Received Date"], row.Amount, row["Fee Type"], row.Result, row.Issue]);
myTable.addRows(-1, tableValues);
}
catch(error)
{
console.log(error);
}
}
interface IPayoff {
"Loan Number": string;
"Mail Received Date": string;
Amount: string;
"Fee Type": string;
Result?: string;
Issue?: string
}

princepabari