Excelize is a library written in pure Go providing a set of functions that allow you to write to and read from XLSX files. Supports reading and writing XLSX file generated by Microsoft Excelโข 2007 and later. Supports saving a file without losing original charts of XLSX. This library needs Go version 1.8 or later.
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.
GitHub: github.com/360EntSecGroup-Skylar/excelize
A summary of changes is available in the Release Notes.
Release Notes
The most notable changes in this release are:
API Changed
The following table lists the changes to the API for v2.0.0 compared to the v1.4.1:
Function | Add error return |
Row Number Change* | Delete | New Addition |
---|---|---|---|---|
ToALphaString | ร | ร | โ | ร |
TitleToNumber | ร | ร | โ | ร |
SplitCellName | ร | ร | ร | โ |
JoinCellName | ร | ร | ร | โ |
ColumnNameToNumber | ร | ร | ร | โ |
ColumnNumberToName | ร | ร | ร | โ |
CellNameToCoordinates | ร | ร | ร | โ |
CoordinatesToCellName | ร | ร | ร | โ |
SetCellFloat | ร | ร | ร | โ |
SetCellStyle | โ | ร | ร | ร |
InsertCol | โ | ร | ร | ร |
RemoveCol | โ | ร | ร | ร |
RemoveRow | โ | โ | ร | ร |
InsertRow | โ | โ | ร | ร |
DuplicateRow | โ | ร | ร | ร |
DuplicateRowTo | โ | ร | ร | ร |
SetRowHeight | โ | ร | ร | ร |
GetRowHeight | โ | ร | ร | ร |
GetCellValue | โ | ร | ร | ร |
GetCellFormula | โ | ร | ร | ร |
GetCellHyperLink | โ | ร | ร | ร |
SetCellHyperLink | โ | ร | ร | ร |
SetCellInt | โ | ร | ร | ร |
SetCellBool | โ | ร | ร | ร |
SetCellStr | โ | ร | ร | ร |
SetCellDefault | โ | ร | ร | ร |
GetCellStyle | โ | ร | ร | ร |
SetCellValue | โ | ร | ร | ร |
MergeCell | โ | ร | ร | ร |
SetSheetRow | โ | ร | ร | ร |
SetRowVisible | โ | โ | ร | ร |
GetRowVisible | โ | โ | ร | ร |
SetRowOutlineLevel | โ | โ | ร | ร |
GetRowOutlineLevel | โ | โ | ร | ร |
GetRows | โ | ร | ร | ร |
Columns | โ | ร | ร | ร |
SearchSheet | โ | ร | ร | ร |
GetPicture | โ | ร | ร | ร |
GetColVisible | โ | ร | ร | ร |
SetColVisible | โ | ร | ร | ร |
GetColOutlineLevel | โ | ร | ร | ร |
SetColOutlineLevel | โ | ร | ร | ร |
SetColWidth | โ | ร | ร | ร |
GetColWidth | โ | ร | ร | ร |
GetMergeCells | โ | ร | ร | ร |
ProtectSheet | โ | ร | ร | ร |
UnprotectSheet | โ | ร | ร | ร |
UpdateLinkedValue | โ | ร | ร | ร |
SetSheetVisible | โ | ร | ร | ร |
adjustHelper | โ | ร | ร | ร |
adjustMergeCells | โ | ร | ร | ร |
adjustAutoFilter | โ | ร | ร | ร |
prepareCell | โ | ร | ร | ร |
setDefaultTimeStyle | โ | ร | ร | ร |
timeToExcelTime | โ | ร | ร | ร |
addDrawingChart | โ | ร | ร | ร |
addDrawingVML | โ | ร | ร | ร |
addDrawingPicture | โ | ร | ร | ร |
getTotalRowsCols | โ | ร | ร | ร |
checkRow | โ | ร | ร | ร |
addDrawingShape | โ | ร | ร | ร |
addTable | โ | ร | ร | ร |
workSheetReader | โ | ร | ร | ร |
copySheet | โ | ร | ร | ร |
* From version 2.0.0 all row manipulation methods uses Excel row numbering starting with 1
instead of zero-based numbering which take place in some methods in earlier versions, related issue #349.
Feature
- New function
DuplicateRowTo()
has been added for duplicate row to specified row position - The function
SetPageLayout()
now support to set page orientation, related issue #318 - The function
SetPageLayout()
now support to set page size
Bug Fixes
- Fix the issue that create 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 xlsx after deleting formula of cell, related issue #346
- Fix the issue that
GetComment()
returns incorrect mapping between worksheets and comments in some case, related issue #345 - Fix the issue #346, resolve the issue corrupted xlsx after deleting formula of cell
- Fix the issue #377, avoid empty column in GetRows result
Performance
- Performance optimization, faster for add 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
Miscellaneous
- Typo fixed and godoc updated
- Tests made stronger again, go1.12 added to tests matrix