DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

xuri
xuri

Posted on • Updated on

Excelize 2.0.0 Released

Excelize logo

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. Support reads and writes XLSX file generated by Microsoft Excelβ„’ 2007 and later. Support save file without losing original charts of XLSX. This library needs Go version 1.8 or later. The full API docs can be seen using go's built-in documentation tool, or online at go.dev and docs reference.

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. A full list of changes is available in the change log.

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

Excelize version 1.4.1 vs 2.0.0

Miscellaneous

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

Top comments (0)

We want your help! Become a Tag Moderator.
Check out this survey and help us moderate our community by becoming a tag moderator here at DEV.