Posted 24 March 2022, 1:26 am EST
Hi Avinash,
I need to pass a JSON file like this below to this component
var colInfos = [
{ name: “position”, displayName: “Position” },
{ name: “name”, displayName: “Display Name” },
{ name: “birthday”, displayName: “Birthday” },
{ name: “age”, displayName: “Age” },
];
As we are passing the JSON to the worksheet like below
<SpreadSheets
backColor={spreadBackColor}
hostStyle={hostStyle}
enterCell={(a, b) => console.log(b)}
valueChanged={(a, b, c, d, e, f) =>
spreadSheetValueChange(a, b, c, d, e, f)()
}
cellChanged={(a, b) => console.log(a, b)}
workbookInitialized={(spread) => spreadFunction(spread)}
>
Kindly please let me know how we can pass the same JSON to the designer component or do we have to add the worksheet ?
And please let me know the structure of JSON to pass inside
const changeJSON = (json)=>{
designer.getWorkbook().fromJSON(json)
}