@@ -13,25 +13,26 @@ let data = [
13
13
{
14
14
sheet: " Adults" ,
15
15
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
19
20
],
20
21
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 " },
23
24
],
24
25
},
25
26
{
26
27
sheet: " Children" ,
27
28
columns: [
28
29
{ 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
31
32
],
32
33
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 " } },
35
36
],
36
37
},
37
38
]
0 commit comments