[ANN] XLSX.jl v0.11.0 now released, bringing significant new functionality

This release introduces significant new functionality as set out below.

There are almost no changes in existing functional APIs in v0.11.0 compared with v0.10.4. Those changes that have been made are described briefly here.

This version drops support for Julia v1.6, and requires at least Julia v1.8.

Breaking changes

There is only one breaking change in this version:

  • infer_eltypes now defaults to true (e.g. in gettable and readtable). This is the more common use case but, if it is not your use case, you will need explicitly to set infer_eltypes = false in the relevant functions.

All other changes either introduce new functionality (documented elsewhere) or relate to internals only.

New Functions

A number of new functions have been added compared with v0.10.4.

These include 18 new functions to support formatting of cells and cell values together with functions to copy or delete a sheet, to merge cells and to add new defined names for cells or cell ranges. In addition, it is now also possible to assign AnnotatedStrings (from StyledStrings.jl) to cells to create content using Excelโ€™s rich text formatting.

A new function, XLSXFile, is provided that takes a Tables.jl compatible table and creates a new XLSXFile object for writing and which can act as a sink for functions such as CSV.read.

A new function, renamesheet! is created to replace rename! for consistency in naming with addsheet!, copysheet! and deletesheet! and to avoid potential name conflicts when exported (e.g. with DataFrames.rename!). However, the existing function XLSX.rename! is retained (but not exported) to avoid a breaking change.

Two new functions, gettransposedtable and readtransposedtable, mirror gettable and readtable for worksheet tables that have data organised in rows rather than columns.

Some additional convenience functions have also been added to streamline functions that were already available (such as newxlsx, savexlsx).

A wide range of additional indexing options is now widely supported by most functions. Most functions now support indexing rows and columns using vectors, ranges and step ranges and will accept a colon.

Exported Functions

Most useful functions are now public, and can be used without the XLSX. prefix. The following function names are now exported:

  • Files and worksheets
    XLSXFile, readxlsx, openxlsx, opentemplate, newxlsx, writexlsx, savexlsx,
    Worksheet, sheetnames, sheetcount, hassheet,
    addsheet!, renamesheet!, copysheet!, deletesheet!

  • Cells & data
    CellRef, row_number, column_number, eachtablerow,
    readdata, getdata, gettable, readtable, readto,
    gettransposedtable, readtransposedtable,
    writetable, writetable!,
    setFormula,
    addDefinedName

  • Formats
    setFormat, setFont, setBorder, setFill, setAlignment,
    setUniformFormat, setUniformFont, setUniformBorder, setUniformFill, setUniformAlignment, setUniformStyle,
    setConditionalFormat,
    RichTextString, RichTextRun,
    setColumnWidth, setRowHeight,
    getMergedCells, isMergedCell, getMergedBaseCell, mergeCells

The iterator XLSX.eachrow has retained the XLSX prefix to avoid making a breaking change. However, Base.eachrow now refers to XLSX.eachrow for XLSX.Worksheet data types, meaning that eachrow can be used without qualification, too.

Fixed issues

This release addresses the following issues:
Add Tutorial about formatting API ยท Issue #52 ยท JuliaData/XLSX.jl ยท GitHub,
Writing Excel files is very slow ยท Issue #61 ยท JuliaData/XLSX.jl ยท GitHub,
Feature request: creating & applying cell styles and conditional formatting ยท Issue #63 ยท JuliaData/XLSX.jl ยท GitHub,
Add a way to delete an existing sheet from an Excel file ยท Issue #80 ยท JuliaData/XLSX.jl ยท GitHub,
indexing Rows with vectors ยท Issue #88 ยท JuliaData/XLSX.jl ยท GitHub,
examples of using cell.formula ยท Issue #120 ยท JuliaData/XLSX.jl ยท GitHub,
Iteration interface enhancement for the row iterator ยท Issue #147 ยท JuliaData/XLSX.jl ยท GitHub,
Defining named ranges ยท Issue #148 ยท JuliaData/XLSX.jl ยท GitHub,
How to get a single row just by a row number? ยท Issue #150 ยท JuliaData/XLSX.jl ยท GitHub,
Defaults / interface for XLSX.readtable ยท Issue #155 ยท JuliaData/XLSX.jl ยท GitHub,
writetable with multiple sheets generates .xlsx file with only one sheet visible to applications with less robust .xlsx readers ยท Issue #156 ยท JuliaData/XLSX.jl ยท GitHub,
Some formulas get overwritten with values when editing existing workbook ยท Issue #159 ยท JuliaData/XLSX.jl ยท GitHub,
Extracting hyperlinks from cells? ยท Issue #165 ยท JuliaData/XLSX.jl ยท GitHub,
Unexpected Content Type ยท Issue #172 ยท JuliaData/XLSX.jl ยท GitHub,
Putting NaN in a cell causes Excel to see an error, but it can recover it. ยท Issue #179 ยท JuliaData/XLSX.jl ยท GitHub,
1 Combine/merge cells. 2 formating table boundaries ยท Issue #184 ยท JuliaData/XLSX.jl ยท GitHub,
Named range being parsed with erroneous single quotes ยท Issue #189 ยท JuliaData/XLSX.jl ยท GitHub,
Asserts should not be used for validation ยท Issue #190 ยท JuliaData/XLSX.jl ยท GitHub,
Recommended way to clear an area in an existing Excel sheet ยท Issue #198 ยท JuliaData/XLSX.jl ยท GitHub,
Sheet is incorrectly shown as 1x1 ยท Issue #222 ยท JuliaData/XLSX.jl ยท GitHub,
c.formula, get full formula text for external links ยท Issue #224 ยท JuliaData/XLSX.jl ยท GitHub,
Simplified way to set cell formulas ยท Issue #232 ยท JuliaData/XLSX.jl ยท GitHub,
Applying number format to columns ยท Issue #234 ยท JuliaData/XLSX.jl ยท GitHub,
Shared formulas not supported ยท Issue #235 ยท JuliaData/XLSX.jl ยท GitHub,
[Bug] Error showing value of type XLSX.XLSXFile, which contains unicode column name ยท Issue #238 ยท JuliaData/XLSX.jl ยท GitHub,
Can supported types (for writing to Excel) be expanded - similar to CSV.write ? ยท Issue #239 ยท JuliaData/XLSX.jl ยท GitHub,
Handling of the merged cells ยท Issue #241 ยท JuliaData/XLSX.jl ยท GitHub,
Cannot open file (failed to parse internal XML file) ยท Issue #243 ยท JuliaData/XLSX.jl ยท GitHub,
Password protected xlsx files ยท Issue #251 ยท JuliaData/XLSX.jl ยท GitHub,
Manually invoking the GC leads to very bad performance if you read many files ยท Issue #252 ยท JuliaData/XLSX.jl ยท GitHub,
Failed to parse internal XML file `xl/comments95.xml` ยท Issue #253 ยท JuliaData/XLSX.jl ยท GitHub,
Cell References unexpected behaviour ยท Issue #258 ยท JuliaData/XLSX.jl ยท GitHub,
XLSX cell format ยท Issue #259 ยท JuliaData/XLSX.jl ยท GitHub,
Offer `normalizenames`? ยท Issue #260 ยท JuliaData/XLSX.jl ยท GitHub,
addsheet! does not append "/xl/worksheets/sheet*.xml" info to [Content_Types].xml ยท Issue #275 ยท JuliaData/XLSX.jl ยท GitHub,
getindex with vector of integer indexes ยท Issue #276 ยท JuliaData/XLSX.jl ยท GitHub,
Add PrecompileTools ยท Issue #277 ยท JuliaData/XLSX.jl ยท GitHub,
gettable does not work? ยท Issue #278 ยท JuliaData/XLSX.jl ยท GitHub,
Writing to a cell in a template overwrites existing formats ยท Issue #281 ยท JuliaData/XLSX.jl ยท GitHub,
Illegal characters can corrupt exported xlsx file ยท Issue #284 ยท JuliaData/XLSX.jl ยท GitHub,
XML.simple_value is only defined for simple nodes ยท Issue #299 ยท JuliaData/XLSX.jl ยท GitHub,
Corruption of < and > in formula ยท Issue #301 ยท JuliaData/XLSX.jl ยท GitHub,
Broken link to ECMA Standard 376 on readme and docs ยท Issue #305 ยท JuliaData/XLSX.jl ยท GitHub,
Cannot create a cell value with leading whitespace ยท Issue #308 ยท JuliaData/XLSX.jl ยท GitHub, Lazy Parsing Feature? ยท Issue #311 ยท JuliaData/XLSX.jl ยท GitHub,
Date vs DateTime when the time is 0:00:00 ยท Issue #314 ยท JuliaData/XLSX.jl ยท GitHub,
possible release notes for v0.11.0 ยท Issue #316 ยท JuliaData/XLSX.jl ยท GitHub,
Cannot round-trip dynamic array functions ยท Issue #324 ยท JuliaData/XLSX.jl ยท GitHub,
== for SheetCellRef is broken ยท Issue #331 ยท JuliaData/XLSX.jl ยท GitHub,
Request: Make a new release ยท Issue #335 ยท JuliaData/XLSX.jl ยท GitHub,
https://github.com/JuliaData/XLSX.jl/issues/338,
https://github.com/JuliaData/XLSX.jl/issues/342.

Documentation

The documentation for this package has been extended substantially to cover the new functionality and all changes are (should be) reflected therein. In particular, a detailed guide to using the new formatting functions has been added.

Internal changes

A number of changes to package internals have been made. Specifically, changes have been made to the following data structs:

  • SheetRowStreamIteratorState
  • WorksheetCacheIteratorState
  • WorksheetCache
  • XLSXFile
  • Workbook
  • Worksheet
  • SheetRow
  • Cell

In particular, the internal memory configuration of an XLSXFile object and its components has been changed significantly, nearly halving the packageโ€™s memory footprint.

Changed dependencies

v0.11.0 has now fully migrated to ZipArchives.jl whereas v0.10.4 relied upon both this and ZipFiles.jl. In addition, xml support is now from XML.jl rather than EzXML.jl.

The use of AnnotatedStrings is supported through a package extension. This requires StyledStrings.jl to be in the active environment.

New functionality that has been added has brought the following additional dependencies compared with v0.10.4:

  • Colors.jl
  • UUIDs.jl
  • Random.jl

In addition, the test suite now has dependencies on CSV.jl, Distributions.jl and StyledStrings.jl.

Precompilation

v0.11.0 now makes use of PrecompileTools.jl (initially only in a small way).

14 Likes