|
| 1 | +# ReXLlenT |
| 2 | + |
| 3 | +ReXLlenT is a typst package that helps you convert Excel **xlsx** tables to typst tables, powered by wasm. (Formerly eXMLlent.) |
| 4 | + |
| 5 | +## Quick Start |
| 6 | + |
| 7 | +Start by importing the package: |
| 8 | + |
| 9 | +```typ |
| 10 | +#import "@preview/rexllent:0.2.0": xlsx-parser |
| 11 | +``` |
| 12 | + |
| 13 | +Then you can use `xlsx-parser` function to convert your xlsx Excel table to typst table. Here is an example: |
| 14 | + |
| 15 | +```typ |
| 16 | +#xlsx-parser(read("test.xlsx", encoding: none)) |
| 17 | +``` |
| 18 | + |
| 19 | +By passing `sheet-index` parameter, you can specify the sheet index to parse. The default value is 0. |
| 20 | + |
| 21 | +```typ |
| 22 | +#xlsx-parser(read("test.xlsx", encoding: none), sheet-index: 1) |
| 23 | +``` |
| 24 | + |
| 25 | +By toggling parameters below, you can customize the output table: |
| 26 | + |
| 27 | +- `parse-table-style`: Parse table style(columns width, rows height), default is `true`. |
| 28 | +- `parse-alignment`: Parse cell content alignment, default is `true`. |
| 29 | +- `parse-stroke`: Parse cell stroke, default is `true`. |
| 30 | +- `parse-fill`: Parse cell fill, default is `true`. |
| 31 | +- `parse-font`: Parse font style, default is `true`. |
| 32 | + |
| 33 | +Extra arguments passed to `xlsx-parser` function will be passed to `table`. Feel free to customize the output table. |
| 34 | + |
| 35 | +Have fun! |
| 36 | + |
| 37 | +## Example |
| 38 | + |
| 39 | +- Excel Table |
| 40 | + |
| 41 | +  |
| 42 | + |
| 43 | +- Typst Table (with default parameters) |
| 44 | + |
| 45 | +  |
| 46 | + |
| 47 | +- Typst Table (with `parse-table-style: false`) |
| 48 | + |
| 49 | +  |
| 50 | + |
| 51 | +- Typst Table (with `parse-alignment: false`) |
| 52 | + |
| 53 | +  |
| 54 | + |
| 55 | +- Typst Table (with `parse-stroke: false`) |
| 56 | + |
| 57 | +  |
| 58 | + |
| 59 | +- Typst Table (with `parse-fill: false`) |
| 60 | + |
| 61 | +  |
| 62 | + |
| 63 | +- Typst Table (with `parse-font: false`) |
| 64 | + |
| 65 | +  |
| 66 | + |
| 67 | +## Credits |
| 68 | + |
| 69 | +- [lublak/typst-spreet-package](https://github.com/lublak/typst-spreet-package) |
| 70 | +- [MathNya/umya-spreadsheet](https://github.com/MathNya/umya-spreadsheet) |
| 71 | + |
| 72 | +## License |
| 73 | + |
| 74 | +This package is licensed under the MIT License. |
0 commit comments