@@ -13,25 +13,26 @@ let data = [
1313 {
1414 sheet: " Adults" ,
1515 columns: [
16- { label: " User" , value: " user" }, // Top level data
17- { label: " Age" , value : (row ) => row .age + " years" }, // Custom format
18- { label: " Phone" , value : (row ) => (row .more ? row .more .phone || " " : " " ) }, // Run functions
16+ { label: " User" , value: " user" , isFormula: true }, // Use formuls
17+ { label: " Age" , value: " age" , format: ' # "years"' }, // Custom format
18+ { label: " Phone" , value : (row : any ) => row? .more ? .phone ?? " " , width: " 5" }, // Run functions and add width
19+ { label: " Date" , value: " date" , format: " DD.MM.YYYY" , type: " d" }, // Set type
1920 ],
2021 content: [
21- { user: " Andrea " , age: 20 , more: { phone: " 11111111" } },
22- { user: " Luis" , age: 21 , more: { phone: " 12345678" } },
22+ { user: ` =HYPERLINK(" ${ window . location . origin } ", "Alex") ` , age: 20 , more: { phone: " 11111111" }, date : " 1999.02.20 " },
23+ { user: " Luis" , age: 21 , more: { phone: " 12345678" }, date : " 1999.01.21 " },
2324 ],
2425 },
2526 {
2627 sheet: " Children" ,
2728 columns: [
2829 { label: " User" , value: " user" }, // Top level data
29- { label: " Age" , value: " age" , format: ' # "years"' }, // Column format
30- { label: " Phone" , value: " more.phone" , format : " (###) ###-#### " }, // Deep props and column format
30+ { label: " Age" , value: " age" , format: ' # "years"' }, // Custom format
31+ { label: " Phone" , value : ( row : any ) => row ? . more ? .phone ?? " " }, // Run functions
3132 ],
3233 content: [
33- { user: " Manuel" , age: 16 , more: { phone: 9999999900 } },
34- { user: " Ana" , age: 17 , more: { phone: 8765432135 } },
34+ { user: " Manuel" , age: 16 , more: { phone: " 99999999 " } },
35+ { user: " Ana" , age: 17 , more: { phone: " 87654321 " } },
3536 ],
3637 },
3738]
0 commit comments