Skip to content

Commit 9d3ef57

Browse files
authored
rexllent: 0.2.1 (typst#1545)
1 parent 4456902 commit 9d3ef57

File tree

13 files changed

+310
-0
lines changed

13 files changed

+310
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) [2025] [Hong Jiarong]
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
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+
![Excel](assets/excel.png)
42+
43+
- Typst Table (with default parameters)
44+
45+
![Typst](assets/example1.png)
46+
47+
- Typst Table (with `parse-table-style: false`)
48+
49+
![Typst](assets/example2.png)
50+
51+
- Typst Table (with `parse-alignment: false`)
52+
53+
![Typst](assets/example3.png)
54+
55+
- Typst Table (with `parse-stroke: false`)
56+
57+
![Typst](assets/example4.png)
58+
59+
- Typst Table (with `parse-fill: false`)
60+
61+
![Typst](assets/example5.png)
62+
63+
- Typst Table (with `parse-font: false`)
64+
65+
![Typst](assets/example6.png)
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.
101 KB
Loading
77 KB
Loading
101 KB
Loading
110 KB
Loading
103 KB
Loading
83.4 KB
Loading
27.8 KB
Loading
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
#import "mod.typ": xlsx-parser

0 commit comments

Comments
 (0)