--
-- libxlsxwriter
--
-- Copyright 2014-2015, John McNamara, jmcnamara@cpan.org. See LICENSE.txt.
--
--
-- libxlsxwriter
--
-- Copyright 2014-2015, John McNamara, jmcnamara@cpan.org. See LICENSE.txt.
--
Following global constants are defined:
No error
Error encountered when creating file zip container
first element
addr of last next element
next element
Following global eu_types are defined:
Following global procedures are defined:
Make a worksheet the active, i.e., visible worksheet.
Params:Set a worksheet tab as selected.
Params:Set the page orientation as landscape.
Params:Set the page orientation as portrait.
Params:Set the page layout to page view mode.
Params:Set the paper type for printing.
Params:| Index | Paper format | Paper size |
| ----- | -------------------- | ----------------- |
| 0 | Printer default | Printer default |
| 1 | Letter | 8 1/2 x 11 in |
| 2 | Letter Small | 8 1/2 x 11 in |
| 3 | Tabloid | 11 x 17 in |
| 4 | Ledger | 17 x 11 in |
| 5 | Legal | 8 1/2 x 14 in |
| 6 | Statement | 5 1/2 x 8 1/2 in |
| 7 | Executive | 7 1/4 x 10 1/2 in |
| 8 | A3 | 297 x 420 mm |
| 9 | A4 | 210 x 297 mm |
| 10 | A4 Small | 210 x 297 mm |
| 11 | A5 | 148 x 210 mm |
| 12 | B4 | 250 x 354 mm |
| 13 | B5 | 182 x 257 mm |
| 14 | Folio | 8 1/2 x 13 in |
| 15 | Quarto | 215 x 275 mm |
| 16 | --- | 1#14 in |
| 17 | --- | 11x17 in |
| 18 | Note | 8 1/2 x 11 in |
| 19 | Envelope 9 | 3 7/8 x 8 7/8 |
| 20 | Envelope 10 | 4 1/8 x 9 1/2 |
| 21 | Envelope 11 | 4 1/2 x 10 3/8 |
| 22 | Envelope 12 | 4 3/4 x 11 |
| 23 | Envelope 14 | 5 x 11 1/2 |
| 24 | C size sheet | --- |
| 25 | D size sheet | --- |
| 26 | E size sheet | --- |
| 27 | Envelope DL | 110 x 220 mm |
| 28 | Envelope C3 | 324 x 458 mm |
| 29 | Envelope C4 | 229 x 324 mm |
| 30 | Envelope C5 | 162 x 229 mm |
| 31 | Envelope C6 | 114 x 162 mm |
| 32 | Envelope C65 | 114 x 229 mm |
| 33 | Envelope B4 | 250 x 353 mm |
| 34 | Envelope B5 | 176 x 250 mm |
| 35 | Envelope B6 | 176 x 125 mm |
| 36 | Envelope | 110 x 230 mm |
| 37 | Monarch | 3.875 x 7.5 in |
| 38 | Envelope | 3 5/8 x 6 1/2 in |
| 39 | Fanfold | 14 7/8 x 11 in |
| 40 | German Std Fanfold | 8 1/2 x 12 in |
| 41 | German Legal Fanfold | 8 1/2 x 13 in |
paper_type = 0 by default
Set the worksheet margins (in inches) for the printed page.
Params:left, right, top and bottom = -1 by default
Set the horizontal page breaks on a worksheet.
Params:Set the vertical page breaks on a worksheet.
Params:Set the order in which pages are printed.
Params:Set the option to display or hide gridlines on the screen and the printed page.
Params:Center the printed page horizontally.
Params:Center the printed page vertically.
Params:Set the option to print the row and column headers on the printed page.
Params:Fit the printed area to a specific number of pages both vertically and horizontally.
Params:Set the start page number when printing.
Params:Set the scale factor for the printed page.
Params:Set the font used in the cell.
Params:Set the size of the font used in the cell.
Params:Set the color of the font used in the cell.
Params:Turn on bold for the format font.
Params:Turn on italic for the format font.
Params:Turn on underline for the format.
Params:The available underline styles are:
- LXW_UNDERLINE_SINGLE
- LXW_UNDERLINE_DOUBLE
- LXW_UNDERLINE_SINGLE_ACCOUNTING
- LXW_UNDERLINE_DOUBLE_ACCOUNTING
Set the strikeout property of the font.
Params:Set the superscript/subscript property of the font.
Params:The available script styles are:
- LXW_FONT_SUPERSCRIPT
- LXW_FONT_SUBSCRIPT
Set the number format for a cell.
Params:Set the Excel built-in number format for a cell.
Params:The Excel built-in number formats as shown in the table below:| Index | Index | Format String |
| ----- | ----- | ---------------------------------------------------- |
| 0 | #00 | `General` |
| 1 | #01 | `0` |
| 2 | #02 | `0.00` |
| 3 | #03 | `#,##0` |
| 4 | #04 | `#,##0.00` |
| 5 | #05 | `($#,##0_);($#,##0)` |
| 6 | #06 | `($#,##0_);[Red]($#,##0)` |
| 7 | #07 | `($#,##0.00_);($#,##0.00)` |
| 8 | #08 | `($#,##0.00_);[Red]($#,##0.00)` |
| 9 | #09 | `0%` |
| 10 | #0a | `0.00%` |
| 11 | #0b | `0.00E+00` |
| 12 | #0c | `# ?/?` |
| 13 | #0d | `# ??/??` |
| 14 | #0e | `m/d/yy` |
| 15 | #0f | `d-mmm-yy` |
| 16 | #10 | `d-mmm` |
| 17 | #11 | `mmm-yy` |
| 18 | #12 | `h:mm AM/PM` |
| 19 | #13 | `h:mm:ss AM/PM` |
| 20 | #14 | `h:mm` |
| 21 | #15 | `h:mm:ss` |
| 22 | #16 | `m/d/yy h:mm` |
| ... | ... | ... |
| 37 | #25 | `(#,##0_);(#,##0)` |
| 38 | #26 | `(#,##0_);[Red](#,##0)` |
| 39 | #27 | `(#,##0.00_);(#,##0.00)` |
| 40 | #28 | `(#,##0.00_);[Red](#,##0.00)` |
| 41 | #29 | `_(* #,##0_);_(* (#,##0);_(* "-"_);_(@_)` |
| 42 | #2a | `_($* #,##0_);_($* (#,##0);_($* "-"_);_(@_)` |
| 43 | #2b | `_(* #,##0.00_);_(* (#,##0.00);_(* "-"??_);_(@_)` |
| 44 | #2c | `_($* #,##0.00_);_($* (#,##0.00);_($* "-"??_);_(@_)` |
| 45 | #2d | `mm:ss` |
| 46 | #2e | `[h]:mm:ss` |
| 47 | #2f | `mm:ss.0` |
| 48 | #30 | `##0.0E+0` |
| 49 | #31 | `@` |
Notes:
- Numeric formats 23 to 36 are not documented by Microsoft and may differ in international
versions. The listed date and currency formats may also vary depending on system settings.
- The dollar sign in the above format appears as the defined local currency symbol.
- These formats can also be set via format_set_num_format().
Set the cell unlocked state.
Params:Hide formulas in a cell.
Params:Set the alignment for data in the cell.
Params:The following are the available horizontal alignments:
- LXW_ALIGN_LEFT
- LXW_ALIGN_CENTER
- LXW_ALIGN_RIGHT
- LXW_ALIGN_FILL
- LXW_ALIGN_JUSTIFY
- LXW_ALIGN_CENTER_ACROSS
- LXW_ALIGN_DISTRIBUTED
The following are the available vertical alignments:
- LXW_ALIGN_VERTICAL_TOP
- LXW_ALIGN_VERTICAL_BOTTOM
- LXW_ALIGN_VERTICAL_CENTER
- LXW_ALIGN_VERTICAL_JUSTIFY
- LXW_ALIGN_VERTICAL_DISTRIBUTED
Wrap text in a cell.
Params:Set the rotation of the text in a cell.
Params:Set the cell text indentation level.
Params:Turn on the text "shrink to fit" for a cell.
Params:Set the background fill pattern for a cell
Params:| Fill Type | Define |
| ----------------------------- | ---------------------------- |
| Solid | LXW_PATTERN_SOLID |
| Medium gray | LXW_PATTERN_MEDIUM_GRAY |
| Dark gray | LXW_PATTERN_DARK_GRAY |
| Light gray | LXW_PATTERN_LIGHT_GRAY |
| Dark horizontal line | LXW_PATTERN_DARK_HORIZONTAL |
| Dark vertical line | LXW_PATTERN_DARK_VERTICAL |
| Dark diagonal stripe | LXW_PATTERN_DARK_DOWN |
| Reverse dark diagonal stripe | LXW_PATTERN_DARK_UP |
| Dark grid | LXW_PATTERN_DARK_GRID |
| Dark trellis | LXW_PATTERN_DARK_TRELLIS |
| Light horizontal line | LXW_PATTERN_LIGHT_HORIZONTAL |
| Light vertical line | LXW_PATTERN_LIGHT_VERTICAL |
| Light diagonal stripe | LXW_PATTERN_LIGHT_DOWN |
| Reverse light diagonal stripe | LXW_PATTERN_LIGHT_UP |
| Light grid | LXW_PATTERN_LIGHT_GRID |
| Light trellis | LXW_PATTERN_LIGHT_TRELLIS |
| 12.5% gray | LXW_PATTERN_GRAY_125 |
| 6.25% gray | LXW_PATTERN_GRAY_0625 |
Set the pattern background color for a cell.
Params:Set the pattern foreground color for a cell.
Params:Set the cell bottom border style.
Params:Set the cell top border style.
Params:Set the cell left border style.
Params:Set the cell right border style.
Params:Set the cell border style.
Params:The following border styles are available:
- LXW_BORDER_THIN
- LXW_BORDER_MEDIUM
- LXW_BORDER_DASHED
- LXW_BORDER_DOTTED
- LXW_BORDER_THICK
- LXW_BORDER_DOUBLE
- LXW_BORDER_HAIR
- LXW_BORDER_MEDIUM_DASHED
- LXW_BORDER_DASH_DOT
- LXW_BORDER_MEDIUM_DASH_DOT
- LXW_BORDER_DASH_DOT_DOT
- LXW_BORDER_MEDIUM_DASH_DOT_DOT
- LXW_BORDER_SLANT_DASH_DOT
The 'style' can be a single atom for all borders, or a sequence
of four values for each border, e.g. {left, top, right, bottom}.
Set the color of the bottom cell border.
Params:Set the color of the top cell border.
Params:Set the color of the left cell border.
Params:Set the color of the right cell border.
Params:Set the color of the cell border.
Params:The 'color' can be a single atom for all borders, or a sequence
of four values for each border, e.g. {left, top, right, bottom}.
Following global functions are defined:
Allocate a datetime structure from a Euphoria datetime value.
Params:'datetime' should be {year, month, day, hour, minute, second}
Allocate a NULL terminated array of 4-byte values.
Params:Create a new workbook object with (optional) additional workbook options.
Params:options = NULL by default
Create a new workbook object with additional workbook options.
Params:Create a new Format object to format cells in worksheets.
Params:Add a new worksheet to a workbook with (optional) the provided name.
Params:sheetname = NULL by default
Close the Workbook object and write the XLSX file.
Params:Return a list of all Worksheets in the Workbook.
Params:Create a defined name in the workbook to use as a variable.
Params:Write a number to a worksheet cell.
Params:format = NULL by default
Write a string to a worksheet cell.
Params:format = NULL by default
Write a formula to a worksheet cell.
Params:format = NULL by default
Write an array formula to a worksheet cell.
Params:format = NULL by default
Write a date or time to a worksheet cell.
Params:format = NULL by default
Write a URL/hyperlink to a worksheet cell.
Params:string, tooltip and format = NULL by default
Write a formatted blank worksheet cell.
Params:format = NULL by default
Set the properties for a row of cells.
Params:format and options = NULL by default
Set the properties for one or more columns of cells.
Params:format and options = NULL by default
Merge a range of cells.
Params:format = NULL by default
Set the autofilter area in the worksheet.
Params:Set the printed page header caption with (optional) additional options.
Params:| Control | Category | Description |
options = NULL by default
| --------------- | ------------- | --------------------- |
| `&L` | Justification | Left |
| `&C` | | Center |
| `&R` | | Right |
| `&P` | Information | Page number |
| `&N` | | Total number of pages |
| `&D` | | Date |
| `&T` | | Time |
| `&F` | | File name |
| `&A` | | Worksheet name |
| `&Z` | | Workbook path |
| `&fontsize` | Font | Font size |
| `&"font,style"` | | Font name and style |
| `&U` | | Single underline |
| `&E` | | Double underline |
| `&S` | | Strikethrough |
| `&X` | | Superscript |
| `&Y` | | Subscript |
Set the printed page footer caption with (optional) additional options.
Params:options = NULL by default
Set the number of rows to repeat at the top of each printed page.
Params:Set the number of columns to repeat at the top of each printed page.
Params:Set the print area for a worksheet.
Params:Convert an Excel `A1` cell string into a `(row, col)` sequence.
Params:Convert an Excel `A:B` column range into a `(col1, col2)` sequence.
Params:Convert an Excel `A1:B2` range into a `(first_row, first_col, last_row, last_col)` sequence.
Params:Convert an Excel `A1:B2` range into a `(row1, row2)` sequence.
Params: