v2.5.0
版本发布时间: 2022-01-03 00:02:21
qax-os/excelize最新发布版本:v2.8.1(2024-02-26 02:47:39)
We are pleased to announce the release of version 2.5.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 changelog.
Release Notes
The most notable changes in this release are:
Breaking Change
- Close spreadsheet and row's iterator required, the user should be close the stream after using the row's iterator, and close the spreadsheet after opening an existing spreadsheet
- Change
ReadZipReader
as an implementation of theFile
, extract spreadsheet with given options, and support extract in memory or touching the filesystem - Remove unnecessary exported variable
XMLHeader
, we can usingencoding/xml
package'sxml.Header
instead of it - Remove unused exported error variable
ErrToExcelTime
Notable Features
- New API:
SetRowStyle
support for set style for the rows, related issue #990 - New API:
GetCellType
support for get the cell's data type, related issue #417 and #520 - New API:
SetAppProps
andGetAppProps
support to set and get document application properites, related issue #1095 -
GetCellValue
,GetRows
,GetCols
,Rows
andCols
support to specify read cell with raw value, related issue #621 - New support 95 formula functions: ACCRINT, ACCRINTM, ADDRESS, AMORDEGRC, AMORLINC, AVEDEV, AVERAGEIF, CHIDIST, CONFIDENCE, CONFIDENCE.NORM, COUNTIF, COUNTIFS, COUPDAYBS, COUPDAYS, COUPDAYSNC, COUPNCD, COUPNUM, COUPPCD, DATEVALUE, DAY, DAYS, DELTA, DEVSQ, DISC, DURATION, ERF, ERF.PRECISE, ERFC, ERFC.PRECISE, GEOMEAN, GESTEP, IFNA, IFS, INDEX, INTRATE, ISFORMULA, ISLOGICAL, ISREF, ISOWEEKNUM, MATCH, MAXA, MAXIFS, MDURATION, MINIFS, MINUTE, MONTH, ODDFPRICE, PERCENTILE.EXC, PERCENTRANK.EXC, PERCENTRANK.INC, PERCENTRANK, PRICE, PRICEDISC, PRICEMAT, PV, QUARTILE.EXC, RANK, RANK.EQ, RATE, RECEIVED, RRI, SHEETS, SLN, STANDARDIZE, STDEV.P, STDEVP, SWITCH, SYD, TBILLEQ, TBILLPRICE, TBILLYIELD, TEXTJOIN, TIME, TRANSPOSE, TRIMMEAN, VALUE, VAR, VAR.S, VARA, VARPA, VDB, WEEKDAY, WEIBULL, WEIBULL.DIST, XIRR, XLOOKUP, XNPV, XOR, YEAR, YEARFRAC, YIELD, YIELDDISC, YIELDMAT, Z.TEST, ZTEST, related issue #1002
- Formula calculation engine support nested calc for
IF
formula, related issue #987 - Formula calculation engine support get shared formula, related issue #844
- Formula calculation engine support text comparison, related issue #998
- Support specify the formula in the data validation range, related issue #1012
- Support specified unzip size limit on open file options, avoid zip bombs vulnerability attack
-
SetCellFormula
now support set the shared formula -
UpdateLinkedValue
will skip macro sheet, related issue #1014 - Fix
AddPicture
created duplicate image in some cases, caused by incorrect internal relationships ID calculation, related issue #1017 -
AddShape
support set line width of add the shape, related issue #262 - New options
UnzipXMLSizeLimit
have been added, support to specifies the memory limit on unzipping worksheet and shared string table in bytes - An error will be returned if given an invalid custom number format when creating a new style, related issue #1028
- Now support set row style in the stream writer
- Stream writer will create a time number format for time type cells, related issue #1107
- Now support specify compact and outline for the pivot table, related issue #1029
- Support get current rows/columns and total rows/columns in the stream reader, related PR #1054
- Now support time zone location when set cell value, related issue #1069
- Export 7 errors so users can act differently on different type of errors
Improve the Compatibility
- Improve compatibility with row element with
r="0"
attribute - Preserve XML control character
- Improve the compatibility of style settings with Apple Numbers, related issue #1059
- Support multi-byte language on set header footer, related issue #1061
- Preserve horizontal tab character when set the cell value, related issue #1108
Bug Fixes
- Fix the data validation deletion failed, resolve issue #979
- Fix set data validation drop list failed in some cases, resolve issue #986
- Fix formula calculation engine
LOOKUP
doesn't handle array form correctly, resolve issue #994 - Fix formula calculation engine
LOOKUP
can only find exact match, resolve issue #997 - Fix formula percentages calculated incorrectly, resolve issue #993
- Fix panic caused by incorrect cell read on some case
- Fix conditional format bottom N not working
- Fix time parse accuracy issue, resolve issue #1026 and #1030
- Fix build-in scientific number format failed, resolve issue #1027
- Fix small float parse error in some case, resolve issue #1031
- Fix worksheet deletion failed in some case
- Fix build-in time number format parse error, resolve issue #1060
- Fix
NewStyle
returned incorrect style ID in some case - Fix merged cell range error after row/column insert/deletion in some corner case
Performance
- Merge cell time cost speed up, based on the previously released version time cost decrease over 90%
- Improve streaming reading performance, unzip shared string table to system temporary file when large inner XML, based on the previously released version, memory usage decreased about 60% at most, related issue #1096
- Worksheet list read speed up
- Merge column styles to reduce spreadsheet size, resolve issue #1057
Miscellaneous
- The dependencies module has been updated
- Unit tests and godoc updated
- Documentation website with multilingual: Arabic, German, Spanish, English, French, Russian, Chinese, Japanese, and Korean, which has been updated