xlsx.create_table
xlsx.create_table(wb, sheet, range, name, [header=true], [style="medium2"], [stripes=true], [total=])
Input: wb, sheet, range, name, header, style, stripes, total · Output: no output
What it is
Turns range into an Excel Table named name (letters, digits, _ and ., starting with a letter or _, not a cell address like A1; unique in the workbook): banded rows, filter buttons, structured references. range includes the header row; header cells that are empty, numeric or repeated are rewritten as unique text (Column3, Sales2) so the cells and the table agree; header=false for data only. style is "light1"-"light21", "medium1"-"medium28", "dark1"-"dark11" (or Excel's TableStyleMedium2), or "none". total=true (or "sum", "average", "count", "min", "max") adds a totals row just BELOW range (it must be empty): the label Total under the first column and a SUBTOTAL formula under every column holding only numbers (stored, not evaluated). A table may not overlap another table, the sheet's autofilter or a merged range.
Overloads
One call shape — this function is not overloaded.
| Code | Input | Output | Description |
xlsx.create_table(wb, sheet, range, name, [header=true], [style="medium2"], [stripes=true], [total=]) | wb —not documented yetsheet —A table may not overlap another table, the sheet's autofilter or a merged range.range —range includes the header row.name TableTurns range into an Excel Table named name (letters, digits, _ and ., starting with a letter or _, not a cell address like A1.header optional (default true)header cells that are empty, numeric or repeated are rewritten as unique text (Column3, Sales2) so the cells and the table agree.style optional (default "medium2")style is "light1"-"light21", "medium1"-"medium28", "dark1"-"dark11" (or Excel's TableStyleMedium2), or "none".stripes optional (default true)not documented yettotal number, optionaltotal=true (or "sum", "average", "count", "min", "max") adds a totals row just BELOW range (it must be empty): the label Total under the first column and a SUBTOTAL formula under every column holding only numbers (stored, not evaluated). | no output | — |
Examples
No documentation example calls this form yet. The File I/O chapter is where one belongs.