Excelize 2.2.0 Released
Tags: go, excel, xml, office
Published: 2020-05-10 16:28:41

---
title: Excelize 2.2.0 Released
published: true
description: Excelize is a library written in pure Go and providing a set of functions that allow you to write to and read from XLSX files. 
tags: Go,Excel,XML,Office
---

<p align="center"><img src="https://xuri.me/excelize/images/excelize.svg" width="440" alt="github.com/xuri/excelize" /></p>

Excelize is a library written in pure Go providing a set of functions that allow you to write to and read from XLSX / XLSM / XLTM files. Supports reading and writing spreadsheet documents generated by Microsoft Excel™ 2007 and later. Supports complex components by high compatibility, and provided streaming API for generating or reading data from a worksheet with huge amounts of data.

GitHub: [github.com/xuri/excelize](https://github.com/xuri/excelize)

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/v2@v2.2.0#File.GetSheetList) to get the worksheet, chart sheet and dialog sheet name list of workbook
* New function [`AddChartSheet`](https://pkg.go.dev/github.com/xuri/excelize/v2@v2.2.0#File.AddChartSheet) support create chart sheet, relate issue #451
* New function [`UnsetConditionalFormat`](https://pkg.go.dev/github.com/xuri/excelize/v2@v2.2.0#File.UnsetConditionalFormat), support for remove conditional format, relate issue #571
* New function [`DeleteDataValidation`](https://pkg.go.dev/github.com/xuri/excelize/v2@v2.2.0#File.DeleteDataValidation), support delete data validation, relate issue #348
* New function [`SetCellRichText`](https://pkg.go.dev/github.com/xuri/excelize/v2@v2.2.0#File.SetCellRichText), support set rich text, relate issue #172
* New functions [`InsertPageBreak`](https://pkg.go.dev/github.com/xuri/excelize/v2@v2.2.0#File.InsertPageBreak) and [`RemovePageBreak`](https://pkg.go.dev/github.com/xuri/excelize/v2@v2.2.0#File.RemovePageBreak), support for insert and remove page break, relate issue #492
* The [`AddPivotTable`](https://pkg.go.dev/github.com/xuri/excelize/v2@v2.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/v2@v2.2.0#File.AddPivotTable) support to set filter for the pivot table, relate issue #598
* The [`AddPivotTable`](https://pkg.go.dev/github.com/xuri/excelize/v2@v2.2.0#File.AddPivotTable) allow empty filter, data, and rows in the pivot table
* Export [`ExcelDateToTime`](https://pkg.go.dev/github.com/xuri/excelize/v2@v2.2.0#File.ExcelDateToTime) function to convert excel date to time
* Export [`Style`](https://pkg.go.dev/github.com/xuri/excelize/v2@v2.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/v2@v2.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/v2@v2.2.0#File.DuplicateRowTo) function doesn't duplicate merged cells, resolve issue #586
* Fix conditional formatting hides the adjacent borders by ignore empty conditional format style, resolve issue #200
* Fix missing comments by [`GetComments`](https://pkg.go.dev/github.com/xuri/excelize/v2@v2.2.0#File.GetComments), resolve issue #345
* Fix reading wrong string by [`GetCellValue`](https://pkg.go.dev/github.com/xuri/excelize/v2@v2.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/v2@v2.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