Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
156 commits
Select commit Hold shift + click to select a range
727c729
Add `newxlsx()` and `opentemplate()` and `CellRef` to docs
TimG1964 Mar 3, 2025
faada66
A few typos
TimG1964 Mar 3, 2025
2ec5241
Add row ranges to formatting functions.
TimG1964 Mar 8, 2025
7ec4710
Update CI
TimG1964 Mar 8, 2025
c215a61
Add `normalizenames` keyword to `XLSX.readtable` (#260)
TimG1964 Mar 14, 2025
98ea6c8
Add three functions for merged cells (no tests yet)
TimG1964 Mar 16, 2025
aeff287
Functions to add Defined Names (more work to do)
TimG1964 Mar 16, 2025
a80af31
Add more support for non-contiguous ranges in defined names.
TimG1964 Mar 16, 2025
ab8a906
Add fix to #239 in writetable!() function
TimG1964 Mar 17, 2025
46e6080
More updates to support non-contiguous cell ramges
TimG1964 Mar 17, 2025
e6ef55b
Preparing to write definedNames in `xlsxwrite()`
TimG1964 Mar 17, 2025
ebd6ebc
Bug fixing new code with existing tests
TimG1964 Mar 17, 2025
893e23a
Support `getdata()` for row ranges
TimG1964 Mar 18, 2025
e15f5b5
Handle apostrophes in sheet names in `definedNames`
TimG1964 Mar 19, 2025
6448f27
Write new `definedNames` out to a new XLSXFile
TimG1964 Mar 20, 2025
c644f72
Handle apostrophes correctly in sheetname part of `definedNames`
TimG1964 Mar 20, 2025
de4aaad
Minor row range fixes
TimG1964 Mar 21, 2025
1c429f4
Begin adding some tests
TimG1964 Mar 21, 2025
290c946
Add new functions to API docs
TimG1964 Mar 22, 2025
62605f3
Add more tests
TimG1964 Mar 22, 2025
3977bef
Minor changes to docstrings...
TimG1964 Mar 22, 2025
0328924
Missing line in CI
TimG1964 Mar 22, 2025
e3f0c51
Try again. :-(
TimG1964 Mar 22, 2025
19ae933
Bump to julia 1.8 and above
TimG1964 Mar 22, 2025
60354dc
New branch for bug fixing post PR #289
TimG1964 Mar 23, 2025
931c83b
Add 'lts' to CI per @Eben60 review
TimG1964 Mar 23, 2025
2419e55
Fix to bug highlighted when `Node.depth` bug in XML
TimG1964 Mar 23, 2025
f320d96
Previous fix but now with actual change!!
TimG1964 Mar 23, 2025
31d9ccf
Update CI to include `aarch64` for MacOS-latest
TimG1964 Mar 23, 2025
c5a54b5
Include versions in CL for MacOS aarch64
TimG1964 Mar 23, 2025
46aac01
Now with all julia versions specified for aarch64, too.
TimG1964 Mar 23, 2025
da56f09
Add test for `setOutsideBorder`
TimG1964 Mar 24, 2025
97b0b0b
Fix the two node depth tests to `XML.depth==2`
TimG1964 Mar 24, 2025
094f5c5
Begin to introduce support for a few named colors
TimG1964 Mar 24, 2025
20d87d8
Add support for named colors from Colors.jl
TimG1964 Mar 25, 2025
6a7dcc3
Revert to XML.escape with XML.jl 0.3.5
TimG1964 Mar 25, 2025
b9b54f0
Integrate `setOutsideBorder` into `setBorder`
TimG1964 Mar 25, 2025
21d7e3a
Minor tweaks!
TimG1964 Mar 26, 2025
bb52427
Fix `getBorder()` for diagonal borders
TimG1964 Mar 27, 2025
c49e74f
Add examples of named colors in docstrings
TimG1964 Mar 27, 2025
35de99f
Update tests for changes to getBorder
TimG1964 Mar 27, 2025
b3feab5
Replace `@assert` with `throw()` (#190)
TimG1964 Mar 28, 2025
2b5ed9a
Row and/or column indexing with vectors of Ints (#276)
TimG1964 Mar 28, 2025
a8d20cd
Address #258 as proposed...
TimG1964 Mar 28, 2025
e73e22b
Address issue #147
TimG1964 Mar 28, 2025
c128d36
Update tests for changes to `getcellranges`
TimG1964 Mar 28, 2025
6ada379
Change `error()` to `throw(XLSXError())`
TimG1964 Mar 29, 2025
ab89728
Extend indexing options for `setdata!()`
TimG1964 Mar 30, 2025
324cf68
Extend indexing for `setAttribute` family of cell formatting functions.
TimG1964 Mar 30, 2025
76a08ec
Add to docstrings.
TimG1964 Mar 30, 2025
deedc76
Fix indexing issues
TimG1964 Mar 31, 2025
0f32cf9
Split cellformat-helpers.jl into separate file
TimG1964 Mar 31, 2025
e94a830
Tweak docstrings...
TimG1964 Mar 31, 2025
158583e
Add some tests for indexing `setAttribute` functions
TimG1964 Mar 31, 2025
12134e1
Fix `setUniformAttribute` call error
TimG1964 Mar 31, 2025
09d482e
A few more tests...
TimG1964 Mar 31, 2025
11f9fa3
Add another set of tests.
TimG1964 Apr 1, 2025
5304da9
More tests
TimG1964 Apr 1, 2025
0fd3cee
Test valid range names
TimG1964 Apr 1, 2025
b5040b9
Fix logic error.
TimG1964 Apr 1, 2025
f139178
Include changes proposed in #287
TimG1964 Apr 2, 2025
247d32e
Single cell range of one empty cell
TimG1964 Apr 3, 2025
e542724
Remove most string interpolation outside `throw()`
TimG1964 Apr 3, 2025
1733c29
Clarify use of `definedNames`
TimG1964 Apr 4, 2025
31a41f9
Typo!
TimG1964 Apr 4, 2025
3027c77
Address issue #88
TimG1964 Apr 8, 2025
6a297d1
Updated to fix issue in #292
TimG1964 Apr 10, 2025
9fcd3fb
Updated with tests for #292
TimG1964 Apr 10, 2025
a0f1aa7
Support merging of cells (#241 & #184)
TimG1964 Apr 12, 2025
8a59fe3
Typo!
TimG1964 Apr 12, 2025
989defe
Improved handling of non-contiguous ranges
TimG1964 Apr 13, 2025
5f21073
Couple of overlooked changes!
TimG1964 Apr 13, 2025
e054a8b
Handle non-contiguous ranges for `setUniformAttribute()` functions
TimG1964 Apr 13, 2025
29ab864
Small change to docs.
TimG1964 Apr 14, 2025
bb90ff8
Fix behavior of `getFormat` when no keywords given.
TimG1964 Apr 14, 2025
fae2925
Add `StepRange` to indexing options.
TimG1964 Apr 14, 2025
94e5037
Detect Excel `.xltx` template files and throw (#293).
TimG1964 Apr 15, 2025
86f6cb3
Address #155 and #52
TimG1964 Apr 16, 2025
d91fcde
Filename typo!
TimG1964 Apr 16, 2025
104c8a5
Try again!
TimG1964 Apr 16, 2025
ac994e7
Take out recalcitrant file.
TimG1964 Apr 16, 2025
f2413b8
... and replace it!
TimG1964 Apr 16, 2025
0d3c1a6
Minor typos
TimG1964 Apr 16, 2025
0975511
Add ability to delete a worksheet (#80)
TimG1964 Apr 18, 2025
6ec3053
Add tests for `deletesheet()`
TimG1964 Apr 18, 2025
c70b5bb
Revisions to docs
TimG1964 Apr 20, 2025
d692711
Begin to add some dynamic conditional formatting
TimG1964 Apr 20, 2025
082a828
Add some docs for `colorScale` conditional formats
TimG1964 Apr 21, 2025
57344d9
Adding tests to improve code coverage
TimG1964 Apr 22, 2025
01e9379
A bunch more tests for coverage.
TimG1964 Apr 23, 2025
eddb247
Continue adding tests for coverage...
TimG1964 Apr 24, 2025
1ba87d0
Now over 90% code-cov according to Coverage.jl!
TimG1964 Apr 25, 2025
02373da
Small changes
TimG1964 Apr 25, 2025
65dc77a
Additions to formatting guide
TimG1964 Apr 26, 2025
a482de3
Finish first version of `colorscale` conditional formatting
TimG1964 Apr 26, 2025
2c6678c
Tweaks
TimG1964 Apr 26, 2025
3c268ad
Merge branch 'master' into Try-deleting-a-sheet
TimG1964 Apr 26, 2025
5cd216f
Remove stray `=` following conflict resolution
TimG1964 Apr 26, 2025
2810bae
Typo in file name in runtests.jl
TimG1964 Apr 26, 2025
1c3e3f6
Correct type in runtests.jl
TimG1964 Apr 27, 2025
653e1bc
Merge branch 'Try-deleting-a-sheet' of https://github.com/TimG1964/XL…
TimG1964 Apr 27, 2025
9d0fa2f
Begin to add `:cell` type conditional formats
TimG1964 Apr 28, 2025
14d7dd0
`:cell` type now basically working
TimG1964 Apr 29, 2025
691069f
Further work on `:cell` type conditional formats
TimG1964 Apr 30, 2025
2514579
All conditional formats except `dataBars` and `iconSets`.
TimG1964 May 2, 2025
78af273
Minor revisions to docs.
TimG1964 May 2, 2025
a710c75
Unify priority to allow overlapping conditional formats
TimG1964 May 5, 2025
29676d5
Add tp formatting.md
TimG1964 May 6, 2025
72fb1e5
More documentation.
TimG1964 May 7, 2025
9fbfa6e
More minor changes to docstrings
TimG1964 May 9, 2025
2448366
More docs!
TimG1964 May 9, 2025
c28bca4
Trying to finish docs!
TimG1964 May 10, 2025
e77a8c2
Start adding some tests
TimG1964 May 10, 2025
323e424
Add more tests for conditional formats
TimG1964 May 11, 2025
8ec009c
Escape formulas properly
TimG1964 May 11, 2025
0b8297b
Change compats but I don't fully umderstand the compat system!
TimG1964 May 11, 2025
19f8451
Changed for Random as well as Distributions!
TimG1964 May 11, 2025
bab91ea
Add `expression` to the list of supported types for conditional formats
TimG1964 May 16, 2025
5ad0a6a
Add `iconSets` (no tests yet)
TimG1964 May 21, 2025
23f0aa1
Add tests for `:iconSet` conditional formats
TimG1964 May 23, 2025
33edd02
Fix compats on UUIDs
TimG1964 May 23, 2025
b7c145e
Tweaks to docs
TimG1964 May 23, 2025
6ebe9af
Add `dataBar` conditional formatting (with tests)
TimG1964 May 28, 2025
18716c0
Update `ci.yml` to match xlsx master
TimG1964 May 28, 2025
0b46a3c
Reinstate 'lts'
TimG1964 May 28, 2025
5d73427
Minor tweaks to docs
TimG1964 May 29, 2025
ed4fe64
take timer out of tests
TimG1964 May 29, 2025
864825b
Tweaks and tidy-up
TimG1964 May 29, 2025
0c18e30
Update README.md
TimG1964 May 30, 2025
44c078d
Eliminate statements like `XML.parse(XML.Node, XML.write(node))`
TimG1964 May 31, 2025
f484de2
Remove some dead code.
TimG1964 May 31, 2025
8fa8349
Remove some dead code.
TimG1964 May 31, 2025
005acaa
Use new `copynode(::Node)` instead of `deepcopy()`
TimG1964 May 31, 2025
08f7ca4
Pack conditional format keywords into a Dict to
TimG1964 Jun 1, 2025
5de2dc9
Rationalise some function calls.
TimG1964 Jun 1, 2025
80acab2
Generate a new uuid when adding a new worksheets.
TimG1964 Jun 1, 2025
58ddf08
Add `copysheet!` with docs and tests. Also include
TimG1964 Jun 4, 2025
e007008
Restructured docs a bit
TimG1964 Jun 6, 2025
0cfe057
Restructure `eachrow` iterator.
TimG1964 Jun 6, 2025
6577b39
Replace `eachrow` with direct cache access (sometimes).
TimG1964 Jun 7, 2025
c3877c6
Add minor test to worksheet `dimension`
TimG1964 Jun 7, 2025
0f92061
Minor tidy-up!
TimG1964 Jun 7, 2025
2cd7bf6
Fix #250 and add tests for same.
TimG1964 Jun 11, 2025
7951e01
Add mmap support for files too big for memory.
TimG1964 Jun 15, 2025
9057cda
Relax compat limits on `Mmap.jl`
TimG1964 Jun 15, 2025
1d45725
Work around XML.jl issue 43 (https://github.com/JuliaComputing/XML.jl…
TimG1964 Jun 20, 2025
1a81a4c
Improve work around issue 43 in XML.jl
TimG1964 Jun 21, 2025
40964fa
Fix failing line!
TimG1964 Jun 21, 2025
dfcaa88
Properly unescape strings in `getdata`
TimG1964 Jun 22, 2025
3d2de98
Add a `savexlsx` function with docs and tests.
TimG1964 Jun 23, 2025
197acbe
Address #243
TimG1964 Jun 24, 2025
ee159c7
Remove need to write to a string on reading (again)
TimG1964 Jun 24, 2025
495f47a
Generalise `readto` to support StructArray as sink
TimG1964 Jun 27, 2025
d8d50a8
`readdf` -> `readto` in tests
TimG1964 Jun 27, 2025
c3c2113
Update API documentation to `readto`
TimG1964 Jun 27, 2025
49aac9a
And again in docs :-(
TimG1964 Jun 27, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: CI
on:
# workflow_dispatch: # <-- Add this to allow manual execution
pull_request:
branches:
- master
Expand All @@ -15,10 +16,10 @@ jobs:
fail-fast: false
matrix:
version:
- '1.7'
- '1.8'
- '1.9'
- '1' # automatically expands to the latest stable 1.x release of Julia
- 'lts'
- 'pre'
- 'nightly'
os:
Expand Down
17 changes: 15 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,34 @@ version = "0.10.5-dev"

[deps]
Artifacts = "56f22d72-fd6d-98f1-02f0-08ddc0907c33"
Colors = "5ae59095-9a9b-59fe-a467-6f913c188581"
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
Mmap = "a63ad114-7e13-5084-954f-fe012c677804"
PrecompileTools = "aea7be01-6a6a-4083-8856-8a6e6704d82a"
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c"
UUIDs = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"
Unicode = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5"
XML = "72c71f33-b9b6-44de-8c94-c961784809e2"
ZipArchives = "49080126-0e18-4c2a-b176-c102e4b3760c"

[compat]
Colors = "0.13.0"
Distributions = "0.25.0"
Mmap = "1"
PrecompileTools = "1"
Random = "1.10.0"
Tables = "1"
UUIDs = "1.8"
XML = "0.3.5"
ZipArchives = "2"
julia = "1.7"
julia = "1.8"

[extras]
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Test", "DataFrames"]
test = ["Test", "Distributions", "Random", "DataFrames"]
54 changes: 49 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,70 @@

Excel file reader/writer for the Julia language.

## Introduction

**XLSX.jl** is a Julia package to read and write
[Excel](https://products.office.com/excel) spreadsheet files.

Internally, an Excel XLSX file is just a
[Zip](https://en.wikipedia.org/wiki/Zip_(file_format)) file with a set of
[XML](https://en.wikipedia.org/wiki/XML) files inside.
The formats for these XML files are described in
the [Standard ECMA-376](https://ecma-international.org/publications-and-standards/standards/ecma-376/).

This package follows the EMCA-376 to parse and generate XLSX files.

## Requirements

* Julia v1.8

* Linux, macOS or Windows.

## Installation

From a Julia session, run:

```julia
julia> using Pkg

julia> Pkg.add("XLSX")
```

## Documentation
## Source Code

Package documentation is hosted at https://felipenoris.github.io/XLSX.jl/stable.
The source code for this package is hosted at
[https://github.com/felipenoris/XLSX.jl](https://github.com/felipenoris/XLSX.jl).

## License

The source code for the package **XLSX.jl** is licensed under
the [MIT License](https://raw.githubusercontent.com/felipenoris/XLSX.jl/master/LICENSE).

## Getting Help

If you're having any trouble, have any questions about this package
or want to ask for a new feature,
just open a new [issue](https://github.com/felipenoris/XLSX.jl/issues).

## Contributing

Contributions are always welcome!

To contribute, fork the project on [GitHub](https://github.com/felipenoris/XLSX.jl)
and send a Pull Request.

## References

* [ECMA Open XML White Paper](https://www.ecma-international.org/news/TC45_current_work/OpenXML%20White%20Paper.pdf)
* [ECMA Open XML White Paper](https://www.ecma-international.org/wp-content/uploads/OpenXML-White-Paper.pdf)

* [ECMA-376](https://www.ecma-international.org/publications/standards/Ecma-376.htm)
* [ECMA-376](https://ecma-international.org/publications-and-standards/standards/ecma-376/)

* [Excel file limits](https://support.office.com/en-gb/article/excel-specifications-and-limits-1672b34d-7043-467e-8e27-269d656771c3)
* [Excel file limits](https://support.microsoft.com/en-us/office/excel-specifications-and-limits-1672b34d-7043-467e-8e27-269d656771c3)

## Alternative Packages

* [LibXLSXWriter.jl](https://github.com/jaakkor2/LibXLSXWriter.jl)

* [ExcelFiles.jl](https://github.com/davidanthoff/ExcelFiles.jl)

* [ExcelReaders.jl](https://github.com/davidanthoff/ExcelReaders.jl)
Expand Down
Binary file modified data/Borders.xlsx
Binary file not shown.
Binary file added data/NoDim.xlsx
Binary file not shown.
Binary file added data/Template File.xltx
Binary file not shown.
Binary file modified data/customXml.xlsx
Binary file not shown.
Binary file added data/empty_v.xlsx
Binary file not shown.
Binary file modified data/general.xlsx
Binary file not shown.
Binary file added data/testmerge.xlsx
Binary file not shown.
13 changes: 12 additions & 1 deletion docs/src/api.md → docs/api.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@

# API Reference

```@index
```

```@docs
XLSX.XLSXFile
XLSX.readxlsx
Expand All @@ -14,6 +17,8 @@ XLSX.hassheet
XLSX.Worksheet
XLSX.rename!
XLSX.addsheet!
XLSX.copysheet!
XLSX.deletesheet!
XLSX.readdata
XLSX.getdata
XLSX.getcell
Expand All @@ -23,22 +28,28 @@ XLSX.row_number
XLSX.column_number
XLSX.eachrow
XLSX.readtable
XLSX.readdf
XLSX.gettable
XLSX.eachtablerow
XLSX.writetable
XLSX.writetable!
XLSX.setConditionalFormat
XLSX.setFormat
XLSX.setUniformFormat
XLSX.setFont
XLSX.setUniformFont
XLSX.setBorder
XLSX.setUniformBorder
XLSX.setOutsideBorder
XLSX.setFill
XLSX.setUniformFill
XLSX.setAlignment
XLSX.setUniformAlignment
XLSX.setUniformStyle
XLSX.setColumnWidth
XLSX.setRowHeight
XLSX.getMergedCells
XLSX.isMergedCell
XLSX.getMergedBaseCell
XLSX.mergeCells
XLSX.addDefinedName
```
16 changes: 13 additions & 3 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,19 @@ makedocs(
pages = [
"Home" => "index.md",
"Tutorial" => "tutorial.md",
"API Reference" => "api.md",
"Migration Guides" => "migration.md",
],
"Formatting Guide" => Any[
"Cell formats" => "formatting/cellFormatting.md",
"Conditional formats" => "formatting/conditionalFormatting.md",
"Working with merged cells" => "formatting/mergedCells.md",
"Examples" => "formatting/examples.md"
],
"Migration Guide" => "migration.md",
"API Reference" => Any[
"Files and worksheets" => "api/files.md",
"Cells and data" => "api/data.md",
"Formats" => "api/formats.md",
]
],
checkdocs=:none,
)

Expand Down
31 changes: 31 additions & 0 deletions docs/src/api/data.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Cells and data

## Cell referencing

```@docs
XLSX.CellRef
XLSX.row_number
XLSX.column_number
XLSX.eachrow
XLSX.eachtablerow
```

## Cell data

```@docs
XLSX.readdata
XLSX.getdata
XLSX.getcell
XLSX.getcellrange
XLSX.gettable
XLSX.readtable
XLSX.readto
XLSX.writetable
XLSX.writetable!
```

## Defined names

```@docs
XLSX.addDefinedName
```
26 changes: 26 additions & 0 deletions docs/src/api/files.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Files and worksheets

## Files

```@docs
XLSX.XLSXFile
XLSX.readxlsx
XLSX.openxlsx
XLSX.opentemplate
XLSX.newxlsx
XLSX.writexlsx
XLSX.savexlsx
```

## Worksheets

```@docs
XLSX.Worksheet
XLSX.sheetnames
XLSX.sheetcount
XLSX.hassheet
XLSX.rename!
XLSX.addsheet!
XLSX.copysheet!
XLSX.deletesheet!
```
42 changes: 42 additions & 0 deletions docs/src/api/formats.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Cells and data

## Cell format

```@docs
XLSX.setFormat
XLSX.setUniformFormat
XLSX.setFont
XLSX.setUniformFont
XLSX.setBorder
XLSX.setUniformBorder
XLSX.setFill
XLSX.setUniformFill
XLSX.setAlignment
XLSX.setUniformAlignment
XLSX.setUniformStyle
```

## Conditional format

```@docs
XLSX.getConditionalFormats
XLSX.setConditionalFormat
```

## Column width and row height

```@docs
XLSX.getColumnWidth
XLSX.setColumnWidth
XLSX.getRowHeight
XLSX.setRowHeight
```

# Merged Cells

```@docs
XLSX.getMergedCells
XLSX.isMergedCell
XLSX.getMergedBaseCell
XLSX.mergeCells
```
Loading
Loading