MCPcopy
hub / github.com/exceljs/exceljs / addTable

Function addTable

spec/unit/doc/worksheet-table.spec.js:19–50  ·  view source on GitHub ↗
(ref, ws)

Source from the content-addressed store, hash-verified

17];
18
19function addTable(ref, ws) {
20 return ws.addTable({
21 name: 'TestTable',
22 ref,
23 headerRow: true,
24 totalsRow: true,
25 style: {
26 theme: 'TableStyleDark3',
27 showRowStripes: true,
28 },
29 columns: [
30 {name: 'Date', totalsRowLabel: 'Totals', filterButton: true},
31 {
32 name: 'Id',
33 totalsRowFunction: 'max',
34 filterButton: true,
35 totalsRowResult: 4,
36 },
37 {
38 name: 'Word',
39 filterButton: false,
40 style: {font: {bold: true, name: 'Comic Sans MS'}},
41 },
42 ],
43 rows: [
44 [new Date('2019-08-01'), 1, 'Bird'],
45 [new Date('2019-08-02'), 2, 'is'],
46 [new Date('2019-08-03'), 3, 'the'],
47 [new Date('2019-08-04'), 4, 'Word'],
48 ],
49 });
50}
51
52function checkTable(ref, ws, testValues) {
53 const a = colCache.decodeAddress(ref);

Callers 1

Calls 1

addTableMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…