Excelize

Latest version: v0.0.3

Safety actively analyzes 723166 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 3 of 4

2.3.0

We are pleased to announce the release of version 2.3.0. Featured are a handful of new areas of functionality and numerous bug fixes.

A summary of changes is available in the [Release Notes](https://github.com/xuri/excelize/releases/tag/v2.3.0). A full list of changes is available in the [changelog](https://github.com/xuri/excelize/compare/v2.2.0...v2.3.0).

Release Notes
------------
The most notable changes in this release are:

Notable Features

* Support to set cell values concurrent, relate issue 670
* New API: [`SetSheetFormatPr`](https://pkg.go.dev/github.com/xuri/excelize/v2v2.3.0?tab=doc#File.SetSheetFormatPr) and [`GetSheetFormatPr`](https://pkg.go.dev/github.com/xuri/excelize/v2v2.3.0?tab=doc#File.GetSheetFormatPr), support to set and get worksheet formatting properties, relate issue 635
* New API: [`GetCols`](https://pkg.go.dev/github.com/xuri/excelize/v2v2.3.0?tab=doc#File.GetCols) and [`Cols`](https://pkg.go.dev/github.com/xuri/excelize/v2v2.3.0?tab=doc#Cols), support columns iterator
* [`AddChart`](https://pkg.go.dev/github.com/xuri/excelize/v2v2.3.0?tab=doc#File.AddChart) support specified logarithmic scale on Y-axis, relate issue 661
* [`AddPicture`](https://pkg.go.dev/github.com/xuri/excelize/v2v2.3.0?tab=doc#File.AddPicture) support insert image autofit cell
* Add limits for total columns, row and filename length
* Formula calculation engine support defined name, relate issue 665
* API [`CalcCellValue`](https://pkg.go.dev/github.com/xuri/excelize/v2v2.3.0?tab=doc#File.CalcCellValue) update, formula calculation engine working in progress: 12 new functions has been added, `COUNTA`, `ISBLANK`, `ISERR`, `ISERROR`, `ISEVEN`, `ISNA`, `ISNONTEXT`, `ISODD`, `ISNUMBER`, `MEDIAN`, `NA`, `SUMIF`

Improve the Compatibility

* Compatible to case-sensitive doc parts path
* Storage string to SST (shared string table), relate issue 622
* Support the `row` element without `r` attribute in the worksheet
* Support XML multi namespace, make compatible with Kingsoft WPS™ Office, relate issue 651
* Improve the compatibility of the auto filter with Office 2007 - 2010, resolve 637

Bug Fixes

* Avoid duplicate filter database in workbook defined name
* Avoid creating duplicate style, resolve 643
* Escape characters for set rich-text
* Fix the issue, comment shapes are changed after reopening spreadsheet created by Excelize, resolve 672
* Fix panic when enabling compiler inline flags, resolve 677 and 679
* Fix the accuracy issue of getting cell value of percentage cell


Miscellaneous

* Improved error handling and fix crash when open invalid spreadsheet file
* Add missing checking error in unit tests
* [Documentation website](https://xuri.me/excelize) with multilingual: English, French, Russian, Chinese, Japanese, and Korean, which has been updated

2.2.0

We are pleased to announce the release of version 2.2.0. Featured are a handful of new areas of functionality and numerous bug fixes.

A summary of changes is available in the [Release Notes](https://github.com/xuri/excelize/releases/tag/v2.2.0). A full list of changes is available in the [changelog](https://github.com/xuri/excelize/compare/v2.1.0...v2.2.0).

Release Notes
------------
The most notable changes in this release are:

Notable Features

* Using the worksheet index instead of ID in the following functions: `GetSheetName`, `GetSheetIndex`, `GetActiveSheetIndex` and `SetActiveSheet`, relate issue 485
* New function [`GetSheetList`](https://pkg.go.dev/github.com/xuri/excelize/v2v2.2.0#File.GetSheetList) to get the worksheet, chart sheet, and dialog sheet name list of the workbook
* New function [`AddChartSheet`](https://pkg.go.dev/github.com/xuri/excelize/v2v2.2.0#File.AddChartSheet) support create chart sheet, relate issue 451
* New function [`UnsetConditionalFormat`](https://pkg.go.dev/github.com/xuri/excelize/v2v2.2.0#File.UnsetConditionalFormat), support for remove conditional format, relate issue 571
* New function [`DeleteDataValidation`](https://pkg.go.dev/github.com/xuri/excelize/v2v2.2.0#File.DeleteDataValidation), support delete data validation, relate issue 348
* New function [`SetCellRichText`](https://pkg.go.dev/github.com/xuri/excelize/v2v2.2.0#File.SetCellRichText), support set rich text, relate issue 172
* New functions [`InsertPageBreak`](https://pkg.go.dev/github.com/xuri/excelize/v2v2.2.0#File.InsertPageBreak) and [`RemovePageBreak`](https://pkg.go.dev/github.com/xuri/excelize/v2v2.2.0#File.RemovePageBreak), support for insert and remove page break, relate issue 492
* The [`AddPivotTable`](https://pkg.go.dev/github.com/xuri/excelize/v2v2.2.0#File.AddPivotTable) API changed, support for setting date field subtotal and names of the pivot table, relate issue 582
* The [`AddPivotTable`](https://pkg.go.dev/github.com/xuri/excelize/v2v2.2.0#File.AddPivotTable) support to set the filter for the pivot table, relate issue 598
* The [`AddPivotTable`](https://pkg.go.dev/github.com/xuri/excelize/v2v2.2.0#File.AddPivotTable) allow empty filter, data, and rows in the pivot table
* Export [`ExcelDateToTime`](https://pkg.go.dev/github.com/xuri/excelize/v2v2.2.0#File.ExcelDateToTime) function to convert excel date to time
* Export [`Style`](https://pkg.go.dev/github.com/xuri/excelize/v2v2.2.0#Style) structs to allow create the style for cells by given JSON or structure pointer, relate issue 470

Bug Fixes

* Fix `greaterThanOrEqual` and `lessThanOrEqual` operators did not work when setting the conditional format for cell by `SetConditionalFormat`, resolve issue 608
* Fix corrupt worksheet created by [`StreamWriter`](https://pkg.go.dev/github.com/xuri/excelize/v2v2.2.0#StreamWriter), resolve issue 576
* Escape character in the formula, resolve issue 578
* Fix the [`DuplicateRowTo`](https://pkg.go.dev/github.com/xuri/excelize/v2v2.2.0#File.DuplicateRowTo) function doesn't duplicate merged cells, resolve issue 586
* Fix conditional formatting hides the adjacent borders by ignoring empty conditional format style, resolve issue 200
* Fix missing comments by [`GetComments`](https://pkg.go.dev/github.com/xuri/excelize/v2v2.2.0#File.GetComments), resolve issue 345
* Fix reading wrong string by [`GetCellValue`](https://pkg.go.dev/github.com/xuri/excelize/v2v2.2.0#File.GetCellValue) in some case, resolve issue 602
* Check and fill the cell without `r` attribute in a row element, fix returned empty value when [`GetCellValue`](https://pkg.go.dev/github.com/xuri/excelize/v2v2.2.0#File.GetCellValue) in some case
* Allow empty or default cell style formats, resolve 628

Performance

* Reduce redundant memory copy in `getRowHeight`

Miscellaneous

* Remove calculated properties to make recalculate formulas in some spreadsheet applications, such as Kingsoft WPS™ Office
* Add missing checking error in unit tests
* [Documentation website](https://xuri.me/excelize) with multilingual: English, French, Russian, Chinese, Japanese, and Korean, which has been updated

2.1.0

We are pleased to announce the release of version 2.1.0. Featured are a handful of new areas of functionality and numerous bug fixes.

A summary of changes is available in the [Release Notes](https://github.com/xuri/excelize/releases/tag/v2.1.0). A full list of changes is available in the [changelog](https://github.com/xuri/excelize/compare/v2.0.2...v2.1.0).

Release Notes
------------
The most notable changes in this release are:

Notable Features

* New function [`DeleteDefinedName`](https://pkg.go.dev/github.com/xuri/excelize/v2v2.1.0#File.DeleteDefinedName), support to delete the defined names of the workbook or worksheet
* New functions [`SetPageMargins`](https://pkg.go.dev/github.com/xuri/excelize/v2v2.1.0#File.SetPageMargins) and [`GetPageMargins`](https://pkg.go.dev/github.com/xuri/excelize/v2v2.1.0#File.GetPageMargins), support to for getting setting page margins
* New functions [`DeleteChart`](https://pkg.go.dev/github.com/xuri/excelize/v2v2.1.0#File.DeleteChart) and [`DeletePicture`](https://pkg.go.dev/github.com/xuri/excelize/v2v2.1.0#File.DeletePicture), support to delete chart and images from the worksheet
* Add support for Excel file that uses no UTF-8 encoding
* The function [`AddChart`](https://pkg.go.dev/github.com/xuri/excelize/v2v2.1.0#File.AddChart) now support to create the pie of pie chart, the bar of pie chart and combo chart
The function [`AddChart`](https://pkg.go.dev/github.com/xuri/excelize/v2v2.1.0#File.AddChart) now support to set minor grid lines for the chart, relate issue 501
The function [`AddChart`](https://pkg.go.dev/github.com/xuri/excelize/v2v2.1.0#File.AddChart) now support to set line width of the line chart, relate issue 505
The function [`AddChart`](https://pkg.go.dev/github.com/xuri/excelize/v2v2.1.0#File.AddChart) now support to set a major unit and tick label skip for the chart, relate issue 538
* The function [`SetColVisible`](https://pkg.go.dev/github.com/xuri/excelize/v2v2.1.0#File.SetColVisible) now support to set column visible by column range
* The function [`AddPivotTable`](https://pkg.go.dev/github.com/xuri/excelize/v2v2.1.0#File.AddPivotTable) allow empty columns in the pivot table, relate issue 511

Bug Fixes

* Fix missing ending space text of the cell
* The [`MergeCell`](https://pkg.go.dev/github.com/xuri/excelize/v2v2.1.0#File.MergeCell) function support overlapped merge cells, resolve issue 533
* Added handling of empty inline rich text in some case, resolve issue 529
* Added handling of empty workbook view in some case, resolve issue 426
* Added handling of escape character in the formula, resolve issue 546

Performance

* New functions [`NewStreamWriter`](https://pkg.go.dev/github.com/xuri/excelize/v2v2.1.0#File.NewStreamWriter) and [`Flush`](https://pkg.go.dev/github.com/xuri/excelize/v2v2.1.0#StreamWriter.Flush) to generate the new worksheet with huge amounts of data. Compared to non-streaming writing, reduced memory usage by 90.2%, time cost by 53%
* Make [`GetRows`](https://pkg.go.dev/github.com/xuri/excelize/v2v2.1.0#File.GetRows) function read data as streaming. Reduced memory usage by 78.9%, relate issues 146 and 382
* Compatibility improvements, adding 49 internal XML namespaces support

Miscellaneous

* Added logging of possible errors when decoding XML, relate issues 539
* Improve code coverage unit tests (line Coverage: 97.04%)
* Add missing checking error in unit tests
* [Documentation website](https://xuri.me/excelize) with multilingual: English, French, Russian, Chinese, Japanese, and Korean, which has been updated

2.0.2

We are pleased to announce the release of version 2.0.2. Featured are a handful of new areas of functionality and numerous bug fixes.

A summary of changes is available in the [Release Notes](https://github.com/xuri/excelize/releases/tag/v2.0.2). A full list of changes is available in the [change log](https://github.com/xuri/excelize/compare/v2.0.0...v2.0.2).

Release Notes
------------
The most notable changes in this release are:

Breaking Change

Upgrade requirements Go language version is 1.10 or later.

Notable Features

* Create pivot table support. New function [`AddPivotTable()`](https://pkg.go.dev/github.com/xuri/excelize/v2v2.0.2#File.AddPivotTable) has been added
* Create sparkline support. New function [`AddSparkline()`](https://pkg.go.dev/github.com/xuri/excelize/v2v2.0.2#File.AddSparkline) has been added
* New function [`GroupSheets()`](https://pkg.go.dev/github.com/xuri/excelize/v2v2.0.2#File.GroupSheets) and [`UngroupSheets()`](https://pkg.go.dev/github.com/xuri/excelize/v2v2.0.2#File.UngroupSheets) support group and ungroup sheets
* New function [`AddVBAProject()`](https://pkg.go.dev/github.com/xuri/excelize/v2v2.0.2#File.AddVBAProject) to support add vbaProject.bin file which contains functions and/or macros
* The function [`SetPageLayout()`](https://pkg.go.dev/github.com/xuri/excelize/v2v2.0.2#File.SetPageLayout) now support to support to set fit to width and height, relate issue 432
* The function [`SetSheetViewOptions()`](https://pkg.go.dev/github.com/xuri/excelize/v2v2.0.2#File.SetSheetViewOptions) support to set whether to "show a zero in cells that have zero value" now
* Allow access to more formula attributes in [`SetCellFormula()`](https://pkg.go.dev/github.com/xuri/excelize/v2v2.0.2#File.SetCellFormula), support set the type of the formula and the ref attribute
* Font strike style support, relate issue 482

Bug Fixes

* Fix missing text of comments in some case, resolve issue 434
* Fix `RemoveRow()` out of range in some case by recalculate offset for merged cells adjuster, resolve issue 437
* Fix invalid formula in data validation drop list
* Fix file corrupted when calling the `Save()` method in the iteration, resolve issue 443
* Compatible with different types of relative paths in `workbook.xml.rels` to fix read file failed in some case, resolve issue 442
* Fixed file corruption when deleting all merged cells in some case
* Fix issue where the protection worksheet settings are invalid in some case, resolve issue 454
* Fix `GetSheetName` doesn't work in some case by check the sheets list based on index instead, resolve issue 457
* Add multi-row inline strings support, relate issue 464
* Fix overflow numeric cell value on the 32-bit operating system, relate issue 386
* Fix go module dependency errors, relate issue 466 and 480
* Fix file corrupted when calling `SetSheetPrOptions()` in some case, resolve issue 483

Performance

* Performance optimization, faster for reading the file, relate issue 439

Miscellaneous

* Add missing error check in [`SetSheetRow()`](https://pkg.go.dev/github.com/xuri/excelize/v2v2.0.2#File.SetSheetRow)
* Optimize code, combine internal functions:
`workBookRelsWriter`, `drawingRelsWriter` into `relsWriter`;
`drawingRelsReader`, `workbookRelsReader`, `workSheetRelsReader` into `relsReader`
`addDrawingRelationships`, `addSheetRelationships` into `addRels`

2.0.1

We are pleased to announce the release of version 2.0.1. Featured are a handful of new areas of functionality and numerous bug fixes.

A summary of changes is available in the [Release Notes](https://github.com/xuri/excelize/releases/tag/v2.0.1). A full list of changes is available in the [change log](https://github.com/xuri/excelize/compare/v2.0.0...v2.0.1).

Release Notes
------------
The most notable changes in this release are:

Notable Features

* New function [`SetHeaderFooter()`](https://pkg.go.dev/github.com/xuri/excelize/v2v2.0.1#File.SetHeaderFooter) init set header and footer support, relate issue 394
* New function [`SetColStyle()`](https://pkg.go.dev/github.com/xuri/excelize/v2v2.0.1#File.SetColStyle) support to set style by columns, relate issue 397
* New functions [`SetDefaultFont()`](https://pkg.go.dev/github.com/xuri/excelize/v2v2.0.1#File.SetDefaultFont) and [`GetDefaultFont()`](https://pkg.go.dev/github.com/xuri/excelize/v2v2.0.1#File.GetDefaultFont) support to change the default font, relate issue 390
* New functions [`SetDocProps()`](https://pkg.go.dev/github.com/xuri/excelize/v2v2.0.1#File.SetDocProps) and [`GetDocProps()`](https://pkg.go.dev/github.com/xuri/excelize/v2v2.0.1#File.GetDocProps), support to set and get doc properties, relate issue 415
* The function [`AddChart()`](https://pkg.go.dev/github.com/xuri/excelize/v2v2.0.1#File.AddChart) now support to create new 26 types of chart: cone, pyramid and cylinder series chart for column and bar, surface 3D, wireframe Surface 3D, contour and wireframe contour,bubble and a 3D bubble chart, unsupported chart type add error prompt
* New functions [`SetDefinedName()`](https://pkg.go.dev/github.com/xuri/excelize/v2v2.0.1#File.SetDefinedName) and [`GetDefinedName()`](https://pkg.go.dev/github.com/xuri/excelize/v2v2.0.1#File.GetDefinedName) support to set and get defined names
* More detailed error information when open the encrypted file
* The function [`AddPicture()`](https://pkg.go.dev/github.com/xuri/excelize/v2v2.0.1#File.AddPicture) now support to add TIF and TIFF format images

Bug Fixes

* Fix structs fields definition errors and keep double quotes in data validation formula
* Fix comments duplicate caused by inner counting errors, resolve issue 373
* Fix read file error caused by getting sheet map errors, resolve issue 404
* Enhance compatibility with PivotTable, resolve issue 413
* Enhance compatibility with font size and a bold style, resolve issue 411, 420, and 425
* Enhance recalculation adjuster to resolve file broken issue, after insert or remove rows in some case, relate issue 421 and 424
* Fix hide sheet does not work in some case, relate issue 418
* Fix multi-chart series caused file corrupted by avoid accent theme color index overflow, relate issue 422

Miscellaneous

* Improve unit testing coverage (Line Coverage: 96.05%)
* Optimize code, fix golint issues

2.0.0

We are pleased to announce the release of version 2.0.0. Featured are a handful of new areas of functionality and numerous bug fixes.

A summary of changes is available in the [Release Notes](https://github.com/xuri/excelize/releases/tag/v2.0.0). A full list of changes is available in the [change log](https://github.com/xuri/excelize/compare/v1.4.1...v2.0.0).

Release Notes
------------
The most notable changes in this release are:

Breaking Change

The following table lists the changes to the functions for v2.0.0 compared to the v1.4.1:

|Function|Add `error` return|Row Number Change<sup>\*</sup>|Delete|New Addition|
|---|---|---|---|---|
|ToALphaString|&times;|&times;|&radic;|&times;|
|TitleToNumber|&times;|&times;|&radic;|&times;|
|SplitCellName|&times;|&times;|&times;|&radic;|
|JoinCellName|&times;|&times;|&times;|&radic;|
|ColumnNameToNumber|&times;|&times;|&times;|&radic;|
|ColumnNumberToName|&times;|&times;|&times;|&radic;|
|CellNameToCoordinates|&times;|&times;|&times;|&radic;|
|CoordinatesToCellName|&times;|&times;|&times;|&radic;|
|SetCellFloat|&times;|&times;|&times;|&radic;|
|SetCellStyle|&radic;|&times;|&times;|&times;|
|InsertCol|&radic;|&times;|&times;|&times;|
|RemoveCol|&radic;|&times;|&times;|&times;|
|RemoveRow|&radic;|&radic;|&times;|&times;|
|InsertRow|&radic;|&radic;|&times;|&times;|
|DuplicateRow|&radic;|&times;|&times;|&times;|
|DuplicateRowTo|&radic;|&times;|&times;|&times;|
|SetRowHeight|&radic;|&times;|&times;|&times;|
|GetRowHeight|&radic;|&times;|&times;|&times;|
|GetCellValue|&radic;|&times;|&times;|&times;|
|GetCellFormula|&radic;|&times;|&times;|&times;|
|GetCellHyperLink|&radic;|&times;|&times;|&times;|
|SetCellHyperLink|&radic;|&times;|&times;|&times;|
|SetCellInt|&radic;|&times;|&times;|&times;|
|SetCellBool|&radic;|&times;|&times;|&times;|
|SetCellStr|&radic;|&times;|&times;|&times;|
|SetCellDefault|&radic;|&times;|&times;|&times;|
|GetCellStyle|&radic;|&times;|&times;|&times;|
|SetCellValue|&radic;|&times;|&times;|&times;|
|MergeCell|&radic;|&times;|&times;|&times;|
|SetSheetRow|&radic;|&times;|&times;|&times;|
|SetRowVisible|&radic;|&radic;|&times;|&times;|
|GetRowVisible|&radic;|&radic;|&times;|&times;|
|SetRowOutlineLevel|&radic;|&radic;|&times;|&times;|
|GetRowOutlineLevel|&radic;|&radic;|&times;|&times;|
|GetRows|&radic;|&times;|&times;|&times;|
|Columns|&radic;|&times;|&times;|&times;|
|SearchSheet|&radic;|&times;|&times;|&times;|
|GetPicture|&radic;|&times;|&times;|&times;|
|GetColVisible|&radic;|&times;|&times;|&times;|
|SetColVisible|&radic;|&times;|&times;|&times;|
|GetColOutlineLevel|&radic;|&times;|&times;|&times;|
|SetColOutlineLevel|&radic;|&times;|&times;|&times;|
|SetColWidth|&radic;|&times;|&times;|&times;|
|GetColWidth|&radic;|&times;|&times;|&times;|
|GetMergeCells|&radic;|&times;|&times;|&times;|
|ProtectSheet|&radic;|&times;|&times;|&times;|
|UnprotectSheet|&radic;|&times;|&times;|&times;|
|UpdateLinkedValue|&radic;|&times;|&times;|&times;|
|SetSheetVisible|&radic;|&times;|&times;|&times;|
|adjustHelper|&radic;|&times;|&times;|&times;|
|adjustMergeCells|&radic;|&times;|&times;|&times;|
|adjustAutoFilter|&radic;|&times;|&times;|&times;|
|prepareCell|&radic;|&times;|&times;|&times;|
|setDefaultTimeStyle|&radic;|&times;|&times;|&times;|
|timeToExcelTime|&radic;|&times;|&times;|&times;|
|addDrawingChart|&radic;|&times;|&times;|&times;|
|addDrawingVML|&radic;|&times;|&times;|&times;|
|addDrawingPicture|&radic;|&times;|&times;|&times;|
|getTotalRowsCols|&radic;|&times;|&times;|&times;|
|checkRow|&radic;|&times;|&times;|&times;|
|addDrawingShape|&radic;|&times;|&times;|&times;|
|addTable|&radic;|&times;|&times;|&times;|
|workSheetReader|&radic;|&times;|&times;|&times;|
|copySheet|&radic;|&times;|&times;|&times;|

\* From version 2.0.0 all row manipulation methods use Excel row numbering starting with `1` instead of zero-based numbering which takes place in some methods in earlier versions, related issue 349.

Notable Features

* New function [`DuplicateRowTo()`](https://pkg.go.dev/github.com/xuri/excelize/v2#File.WriteTo) has been added for duplicate row to specified row position
* The function [`SetPageLayout()`](https://pkg.go.dev/github.com/xuri/excelize/v2#File.SetPageLayout) now support to set page orientation, related issue 318
* The function [`SetPageLayout()`](https://pkg.go.dev/github.com/xuri/excelize/v2#File.SetPageLayout) now support to set page size

Bug Fixes

* Fix the issue that creates a blank fill if no fill is specified in the style format
* Fix the issue that data validation list in the excel sheet disappears formula characters greater than `255`, related issue 339
* Fix the issue corrupted spreadsheet file after deleting formula of the cell, related issue 346
* Fix the issue that [`GetComment()`](https://pkg.go.dev/github.com/xuri/excelize/v2#File.GetComment) returns incorrect mapping between worksheets and comments in some case, related issue 345
* Fix the issue 346, resolve the issue corrupted spreadsheet file after deleting formula of cell
* Fix the issue 377, avoid empty column in GetRows result

Performance

* Performance optimization, faster for adding comments, related issue 347, faster add images, charts, and shapes, related issue 274
* Adding the same image should create a drawing referencing the
already stored copy of the image, related issue 359

<img src="https://user-images.githubusercontent.com/2809468/56576273-7e7f1d80-65fa-11e9-8b47-7b171c5e67e3.png" width="600" alt="Excelize v1.4.1 VS v2.0.0">

Miscellaneous

* Typo fixed and godoc updated
* Tests made stronger again, go1.12 added to tests matrix

Page 3 of 4

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.