From f8f699a172bd0219a8736b19091dd3eaa9eb3b25 Mon Sep 17 00:00:00 2001 From: xuri Date: Sun, 4 Apr 2021 15:29:43 +0800 Subject: [PATCH] Go 1.15 and later required, #65 fn: IMABS, IMCOS, IMCOSH, IMCOT, IMCSC, IMCSCH, IMEXP, IMLN and IMLOG10 --- .travis.yml | 4 - README.md | 2 +- README_zh.md | 2 +- adjust.go | 2 +- calc.go | 206 ++++++++++++++++++++++++++++++++++++++++- calc_test.go | 71 ++++++++++++++ calcchain.go | 2 +- cell.go | 2 +- chart.go | 2 +- col.go | 2 +- comment.go | 2 +- comment_test.go | 2 +- crypt.go | 2 +- crypt_test.go | 2 +- datavalidation.go | 2 +- datavalidation_test.go | 2 +- date.go | 2 +- docProps.go | 2 +- docProps_test.go | 2 +- drawing.go | 2 +- drawing_test.go | 2 +- errors.go | 2 +- excelize.go | 2 +- file.go | 2 +- go.mod | 2 +- lib.go | 2 +- merge.go | 2 +- picture.go | 2 +- pivotTable.go | 2 +- rows.go | 2 +- shape.go | 2 +- sheet.go | 2 +- sheetpr.go | 2 +- sheetview.go | 2 +- sparkline.go | 2 +- stream.go | 2 +- styles.go | 2 +- table.go | 2 +- templates.go | 2 +- vmlDrawing.go | 2 +- xmlApp.go | 2 +- xmlCalcChain.go | 2 +- xmlChart.go | 2 +- xmlChartSheet.go | 2 +- xmlComments.go | 2 +- xmlContentTypes.go | 2 +- xmlCore.go | 2 +- xmlDecodeDrawing.go | 2 +- xmlDrawing.go | 2 +- xmlPivotCache.go | 2 +- xmlPivotTable.go | 2 +- xmlSharedStrings.go | 2 +- xmlStyles.go | 2 +- xmlTable.go | 2 +- xmlTheme.go | 2 +- xmlWorkbook.go | 2 +- xmlWorksheet.go | 2 +- 57 files changed, 328 insertions(+), 61 deletions(-) diff --git a/.travis.yml b/.travis.yml index f302eede..34ce8ee3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,10 +4,6 @@ install: - go get -d -t -v ./... && go build -v ./... go: - - 1.11.x - - 1.12.x - - 1.13.x - - 1.14.x - 1.15.x - 1.16.x diff --git a/README.md b/README.md index 44fc57a6..ce7cf3d7 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ ## Introduction -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. This library needs Go version 1.10 or later. The full API docs can be seen using go's built-in documentation tool, or online at [go.dev](https://pkg.go.dev/github.com/360EntSecGroup-Skylar/excelize/v2?tab=doc) and [docs reference](https://xuri.me/excelize/). +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. This library needs Go version 1.15 or later. The full API docs can be seen using go's built-in documentation tool, or online at [go.dev](https://pkg.go.dev/github.com/360EntSecGroup-Skylar/excelize/v2?tab=doc) and [docs reference](https://xuri.me/excelize/). ## Basic Usage diff --git a/README_zh.md b/README_zh.md index 1118367d..cf9888b3 100644 --- a/README_zh.md +++ b/README_zh.md @@ -13,7 +13,7 @@ ## 简介 -Excelize 是 Go 语言编写的用于操作 Office Excel 文档基础库,基于 ECMA-376,ISO/IEC 29500 国际标准。可以使用它来读取、写入由 Microsoft Excel™ 2007 及以上版本创建的电子表格文档。支持 XLSX / XLSM / XLTM 等多种文档格式,高度兼容带有样式、图片(表)、透视表、切片器等复杂组件的文档,并提供流式读写 API,用于处理包含大规模数据的工作簿。可应用于各类报表平台、云计算、边缘计算等系统。使用本类库要求使用的 Go 语言为 1.10 或更高版本,完整的 API 使用文档请访问 [go.dev](https://pkg.go.dev/github.com/360EntSecGroup-Skylar/excelize/v2?tab=doc) 或查看 [参考文档](https://xuri.me/excelize/)。 +Excelize 是 Go 语言编写的用于操作 Office Excel 文档基础库,基于 ECMA-376,ISO/IEC 29500 国际标准。可以使用它来读取、写入由 Microsoft Excel™ 2007 及以上版本创建的电子表格文档。支持 XLSX / XLSM / XLTM 等多种文档格式,高度兼容带有样式、图片(表)、透视表、切片器等复杂组件的文档,并提供流式读写 API,用于处理包含大规模数据的工作簿。可应用于各类报表平台、云计算、边缘计算等系统。使用本类库要求使用的 Go 语言为 1.15 或更高版本,完整的 API 使用文档请访问 [go.dev](https://pkg.go.dev/github.com/360EntSecGroup-Skylar/excelize/v2?tab=doc) 或查看 [参考文档](https://xuri.me/excelize/)。 ## 快速上手 diff --git a/adjust.go b/adjust.go index 3694fb66..e06d4f62 100644 --- a/adjust.go +++ b/adjust.go @@ -7,7 +7,7 @@ // 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. This -// library needs Go version 1.10 or later. +// library needs Go version 1.15 or later. package excelize diff --git a/calc.go b/calc.go index ae22c02a..9cb67a1f 100644 --- a/calc.go +++ b/calc.go @@ -7,7 +7,7 @@ // 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. This -// library needs Go version 1.10 or later. +// library needs Go version 1.15 or later. package excelize @@ -17,6 +17,7 @@ import ( "errors" "fmt" "math" + "math/cmplx" "math/rand" "net/url" "reflect" @@ -292,6 +293,15 @@ var tokenPriority = map[string]int{ // HLOOKUP // IF // IFERROR +// IMABS +// IMCOS +// IMCOSH +// IMCOT +// IMCSC +// IMCSCH +// IMEXP +// IMLN +// IMLOG10 // INT // ISBLANK // ISERR @@ -1475,8 +1485,38 @@ func (fn *formulaFuncs) COMPLEX(argsList *list.List) formulaArg { return newErrorFormulaArg(formulaErrorVALUE, formulaErrorVALUE) } } - r := strings.NewReplacer("(", "", ")", "", "0+", "", "+0i", "", "0+0i", "0", "i", suffix) - return newStringFormulaArg(r.Replace(fmt.Sprint(complex(real.Number, i.Number)))) + return newStringFormulaArg(cmplx2str(fmt.Sprint(complex(real.Number, i.Number)), suffix)) +} + +// cmplx2str replace complex number string characters. +func cmplx2str(c, suffix string) string { + if c == "(0+0i)" || c == "(0-0i)" { + return "0" + } + c = strings.TrimPrefix(c, "(") + c = strings.TrimPrefix(c, "+0+") + c = strings.TrimPrefix(c, "-0+") + c = strings.TrimSuffix(c, ")") + c = strings.TrimPrefix(c, "0+") + if strings.HasPrefix(c, "0-") { + c = "-" + strings.TrimPrefix(c, "0-") + } + c = strings.TrimPrefix(c, "0+") + c = strings.TrimSuffix(c, "+0i") + c = strings.TrimSuffix(c, "-0i") + c = strings.NewReplacer("+1i", "i", "-1i", "-i").Replace(c) + c = strings.Replace(c, "i", suffix, -1) + return c +} + +// str2cmplx convert complex number string characters. +func str2cmplx(c string) string { + c = strings.Replace(c, "j", "i", -1) + if c == "i" { + c = "1i" + } + c = strings.NewReplacer("+i", "+1i", "-i", "-1i").Replace(c) + return c } // DEC2BIN function converts a decimal number into a Binary (Base 2) number. @@ -1651,6 +1691,166 @@ func (fn *formulaFuncs) hex2dec(number string) formulaArg { return newNumberFormulaArg(decimal) } +// IMABS function returns the absolute value (the modulus) of a complex +// number. The syntax of the function is: +// +// IMABS(inumber) +// +func (fn *formulaFuncs) IMABS(argsList *list.List) formulaArg { + if argsList.Len() != 1 { + return newErrorFormulaArg(formulaErrorVALUE, "IMABS requires 1 argument") + } + inumber, err := strconv.ParseComplex(strings.Replace(argsList.Front().Value.(formulaArg).Value(), "j", "i", -1), 128) + if err != nil { + return newErrorFormulaArg(formulaErrorNUM, err.Error()) + } + return newNumberFormulaArg(cmplx.Abs(inumber)) +} + +// IMCOS function returns the cosine of a supplied complex number. The syntax +// of the function is: +// +// IMCOS(inumber) +// +func (fn *formulaFuncs) IMCOS(argsList *list.List) formulaArg { + if argsList.Len() != 1 { + return newErrorFormulaArg(formulaErrorVALUE, "IMCOS requires 1 argument") + } + inumber, err := strconv.ParseComplex(strings.Replace(argsList.Front().Value.(formulaArg).Value(), "j", "i", -1), 128) + if err != nil { + return newErrorFormulaArg(formulaErrorNUM, err.Error()) + } + return newStringFormulaArg(cmplx2str(fmt.Sprint(cmplx.Cos(inumber)), "i")) +} + +// IMCOSH function returns the hyperbolic cosine of a supplied complex number. The syntax +// of the function is: +// +// IMCOSH(inumber) +// +func (fn *formulaFuncs) IMCOSH(argsList *list.List) formulaArg { + if argsList.Len() != 1 { + return newErrorFormulaArg(formulaErrorVALUE, "IMCOSH requires 1 argument") + } + inumber, err := strconv.ParseComplex(str2cmplx(argsList.Front().Value.(formulaArg).Value()), 128) + if err != nil { + return newErrorFormulaArg(formulaErrorNUM, err.Error()) + } + return newStringFormulaArg(cmplx2str(fmt.Sprint(cmplx.Cosh(inumber)), "i")) +} + +// IMCOT function returns the cotangent of a supplied complex number. The syntax +// of the function is: +// +// IMCOT(inumber) +// +func (fn *formulaFuncs) IMCOT(argsList *list.List) formulaArg { + if argsList.Len() != 1 { + return newErrorFormulaArg(formulaErrorVALUE, "IMCOT requires 1 argument") + } + inumber, err := strconv.ParseComplex(str2cmplx(argsList.Front().Value.(formulaArg).Value()), 128) + if err != nil { + return newErrorFormulaArg(formulaErrorNUM, err.Error()) + } + return newStringFormulaArg(cmplx2str(fmt.Sprint(cmplx.Cot(inumber)), "i")) +} + +// IMCSC function returns the cosecant of a supplied complex number. The syntax +// of the function is: +// +// IMCSC(inumber) +// +func (fn *formulaFuncs) IMCSC(argsList *list.List) formulaArg { + if argsList.Len() != 1 { + return newErrorFormulaArg(formulaErrorVALUE, "IMCSC requires 1 argument") + } + inumber, err := strconv.ParseComplex(str2cmplx(argsList.Front().Value.(formulaArg).Value()), 128) + if err != nil { + return newErrorFormulaArg(formulaErrorNUM, err.Error()) + } + num := 1 / cmplx.Sin(inumber) + if cmplx.IsInf(num) { + return newErrorFormulaArg(formulaErrorNUM, formulaErrorNUM) + } + return newStringFormulaArg(cmplx2str(fmt.Sprint(num), "i")) +} + +// IMCSCH function returns the hyperbolic cosecant of a supplied complex +// number. The syntax of the function is: +// +// IMCSCH(inumber) +// +func (fn *formulaFuncs) IMCSCH(argsList *list.List) formulaArg { + if argsList.Len() != 1 { + return newErrorFormulaArg(formulaErrorVALUE, "IMCSCH requires 1 argument") + } + inumber, err := strconv.ParseComplex(str2cmplx(argsList.Front().Value.(formulaArg).Value()), 128) + if err != nil { + return newErrorFormulaArg(formulaErrorNUM, err.Error()) + } + num := 1 / cmplx.Sinh(inumber) + if cmplx.IsInf(num) { + return newErrorFormulaArg(formulaErrorNUM, formulaErrorNUM) + } + return newStringFormulaArg(cmplx2str(fmt.Sprint(num), "i")) +} + +// IMEXP function returns the exponential of a supplied complex number. The +// syntax of the function is: +// +// IMEXP(inumber) +// +func (fn *formulaFuncs) IMEXP(argsList *list.List) formulaArg { + if argsList.Len() != 1 { + return newErrorFormulaArg(formulaErrorVALUE, "IMEXP requires 1 argument") + } + inumber, err := strconv.ParseComplex(str2cmplx(argsList.Front().Value.(formulaArg).Value()), 128) + if err != nil { + return newErrorFormulaArg(formulaErrorNUM, err.Error()) + } + return newStringFormulaArg(cmplx2str(fmt.Sprint(cmplx.Exp(inumber)), "i")) +} + +// IMLN function returns the natural logarithm of a supplied complex number. +// The syntax of the function is: +// +// IMLN(inumber) +// +func (fn *formulaFuncs) IMLN(argsList *list.List) formulaArg { + if argsList.Len() != 1 { + return newErrorFormulaArg(formulaErrorVALUE, "IMLN requires 1 argument") + } + inumber, err := strconv.ParseComplex(str2cmplx(argsList.Front().Value.(formulaArg).Value()), 128) + if err != nil { + return newErrorFormulaArg(formulaErrorNUM, err.Error()) + } + num := cmplx.Log(inumber) + if cmplx.IsInf(num) { + return newErrorFormulaArg(formulaErrorNUM, formulaErrorNUM) + } + return newStringFormulaArg(cmplx2str(fmt.Sprint(num), "i")) +} + +// IMLOG10 function returns the common (base 10) logarithm of a supplied +// complex number. The syntax of the function is: +// +// IMLOG10(inumber) +// +func (fn *formulaFuncs) IMLOG10(argsList *list.List) formulaArg { + if argsList.Len() != 1 { + return newErrorFormulaArg(formulaErrorVALUE, "IMLOG10 requires 1 argument") + } + inumber, err := strconv.ParseComplex(str2cmplx(argsList.Front().Value.(formulaArg).Value()), 128) + if err != nil { + return newErrorFormulaArg(formulaErrorNUM, err.Error()) + } + num := cmplx.Log10(inumber) + if cmplx.IsInf(num) { + return newErrorFormulaArg(formulaErrorNUM, formulaErrorNUM) + } + return newStringFormulaArg(cmplx2str(fmt.Sprint(num), "i")) +} + // OCT2BIN function converts an Octal (Base 8) number into a Binary (Base 2) // number. The syntax of the function is: // diff --git a/calc_test.go b/calc_test.go index 2abeec00..5fbc6a39 100644 --- a/calc_test.go +++ b/calc_test.go @@ -90,6 +90,9 @@ func TestCalcCellValue(t *testing.T) { "=COMPLEX(10,-5,\"i\")": "10-5i", "=COMPLEX(0,5)": "5i", "=COMPLEX(3,0)": "3", + "=COMPLEX(0,-2)": "-2i", + "=COMPLEX(0,0)": "0", + "=COMPLEX(0,-1,\"j\")": "-j", // DEC2BIN "=DEC2BIN(2)": "10", "=DEC2BIN(3)": "11", @@ -127,6 +130,43 @@ func TestCalcCellValue(t *testing.T) { "=HEX2OCT(\"8\",10)": "0000000010", "=HEX2OCT(\"FFFFFFFFF8\")": "7777777770", "=HEX2OCT(\"1F3\")": "763", + // IMABS + "=IMABS(\"2j\")": "2", + "=IMABS(\"-1+2i\")": "2.23606797749979", + "=IMABS(COMPLEX(-1,2,\"j\"))": "2.23606797749979", + // IMCOS + "=IMCOS(0)": "1", + "=IMCOS(0.5)": "0.877582561890373", + "=IMCOS(\"3+0.5i\")": "-1.1163412445261518-0.0735369737112366i", + // IMCOSH + "=IMCOSH(0.5)": "1.127625965206381", + "=IMCOSH(\"3+0.5i\")": "8.835204606500994+4.802825082743033i", + "=IMCOSH(\"2-i\")": "2.0327230070196656-3.0518977991518i", + "=IMCOSH(COMPLEX(1,-1))": "0.8337300251311491-0.9888977057628651i", + // IMCOT + "=IMCOT(0.5)": "1.830487721712452", + "=IMCOT(\"3+0.5i\")": "-0.4793455787473728-2.016092521506228i", + "=IMCOT(\"2-i\")": "-0.171383612909185+0.8213297974938518i", + "=IMCOT(COMPLEX(1,-1))": "0.21762156185440268+0.868014142895925i", + // IMCSC + "=IMCSC(\"j\")": "-0.8509181282393216i", + // IMCSCH + "=IMCSCH(COMPLEX(1,-1))": "0.30393100162842646+0.6215180171704284i", + // IMEXP + "=IMEXP(0)": "1", + "=IMEXP(0.5)": "1.648721270700128", + "=IMEXP(\"1-2i\")": "-1.1312043837568135-2.4717266720048183i", + "=IMEXP(COMPLEX(1,-1))": "1.4686939399158851-2.2873552871788423i", + // IMLN + "=IMLN(0.5)": "-0.693147180559945", + "=IMLN(\"3+0.5i\")": "1.1123117757621668+0.16514867741462683i", + "=IMLN(\"2-i\")": "0.8047189562170503-0.4636476090008061i", + "=IMLN(COMPLEX(1,-1))": "0.3465735902799727-0.7853981633974483i", + // IMLOG10 + "=IMLOG10(0.5)": "-0.301029995663981", + "=IMLOG10(\"3+0.5i\")": "0.48307086636951624+0.07172315929479262i", + "=IMLOG10(\"2-i\")": "0.34948500216800943-0.20135959813668655i", + "=IMLOG10(COMPLEX(1,-1))": "0.1505149978319906-0.3410940884604603i", // OCT2BIN "=OCT2BIN(\"5\")": "101", "=OCT2BIN(\"0000000001\")": "1", @@ -1135,6 +1175,37 @@ func TestCalcCellValue(t *testing.T) { "=HEX2OCT(1,\"\")": "strconv.ParseFloat: parsing \"\": invalid syntax", "=HEX2OCT(-513,10)": "strconv.ParseInt: parsing \"-\": invalid syntax", "=HEX2OCT(1,-1)": "#NUM!", + // IMABS + "=IMABS()": "IMABS requires 1 argument", + "=IMABS(\"\")": "strconv.ParseComplex: parsing \"\": invalid syntax", + // IMCOS + "=IMCOS()": "IMCOS requires 1 argument", + "=IMCOS(\"\")": "strconv.ParseComplex: parsing \"\": invalid syntax", + // IMCOSH + "=IMCOSH()": "IMCOSH requires 1 argument", + "=IMCOSH(\"\")": "strconv.ParseComplex: parsing \"\": invalid syntax", + // IMCOT + "=IMCOT()": "IMCOT requires 1 argument", + "=IMCOT(\"\")": "strconv.ParseComplex: parsing \"\": invalid syntax", + // IMCSC + "=IMCSC()": "IMCSC requires 1 argument", + "=IMCSC(\"\")": "strconv.ParseComplex: parsing \"\": invalid syntax", + "=IMCSC(0)": "#NUM!", + // IMCSCH + "=IMCSCH()": "IMCSCH requires 1 argument", + "=IMCSCH(\"\")": "strconv.ParseComplex: parsing \"\": invalid syntax", + "=IMCSCH(0)": "#NUM!", + // IMEXP + "=IMEXP()": "IMEXP requires 1 argument", + "=IMEXP(\"\")": "strconv.ParseComplex: parsing \"\": invalid syntax", + // IMLN + "=IMLN()": "IMLN requires 1 argument", + "=IMLN(\"\")": "strconv.ParseComplex: parsing \"\": invalid syntax", + "=IMLN(0)": "#NUM!", + // IMLOG10 + "=IMLOG10()": "IMLOG10 requires 1 argument", + "=IMLOG10(\"\")": "strconv.ParseComplex: parsing \"\": invalid syntax", + "=IMLOG10(0)": "#NUM!", // OCT2BIN "=OCT2BIN()": "OCT2BIN requires at least 1 argument", "=OCT2BIN(1,1,1)": "OCT2BIN allows at most 2 arguments", diff --git a/calcchain.go b/calcchain.go index fdc4d3eb..ea3080f2 100644 --- a/calcchain.go +++ b/calcchain.go @@ -7,7 +7,7 @@ // 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. This -// library needs Go version 1.10 or later. +// library needs Go version 1.15 or later. package excelize diff --git a/cell.go b/cell.go index fd8772fd..27d24d98 100644 --- a/cell.go +++ b/cell.go @@ -7,7 +7,7 @@ // 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. This -// library needs Go version 1.10 or later. +// library needs Go version 1.15 or later. package excelize diff --git a/chart.go b/chart.go index d22cdb04..1e2e0465 100644 --- a/chart.go +++ b/chart.go @@ -7,7 +7,7 @@ // 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. This -// library needs Go version 1.10 or later. +// library needs Go version 1.15 or later. package excelize diff --git a/col.go b/col.go index 40ef45ff..09a172a1 100644 --- a/col.go +++ b/col.go @@ -7,7 +7,7 @@ // 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. This -// library needs Go version 1.10 or later. +// library needs Go version 1.15 or later. package excelize diff --git a/comment.go b/comment.go index 7e6d31fa..3c48d618 100644 --- a/comment.go +++ b/comment.go @@ -7,7 +7,7 @@ // 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. This -// library needs Go version 1.10 or later. +// library needs Go version 1.15 or later. package excelize diff --git a/comment_test.go b/comment_test.go index 80ed0d00..ee8b8266 100644 --- a/comment_test.go +++ b/comment_test.go @@ -5,7 +5,7 @@ // Package excelize 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.10 or later. +// charts of XLSX. This library needs Go version 1.15 or later. package excelize diff --git a/crypt.go b/crypt.go index 5ecdf334..88abd0e3 100644 --- a/crypt.go +++ b/crypt.go @@ -5,7 +5,7 @@ // Package excelize 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.10 or later. +// charts of XLSX. This library needs Go version 1.15 or later. package excelize diff --git a/crypt_test.go b/crypt_test.go index 2e35001c..6a882e5d 100644 --- a/crypt_test.go +++ b/crypt_test.go @@ -5,7 +5,7 @@ // Package excelize 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.10 or later. +// charts of XLSX. This library needs Go version 1.15 or later. package excelize diff --git a/datavalidation.go b/datavalidation.go index 7d7de0aa..0f8508ba 100644 --- a/datavalidation.go +++ b/datavalidation.go @@ -7,7 +7,7 @@ // 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. This -// library needs Go version 1.10 or later. +// library needs Go version 1.15 or later. package excelize diff --git a/datavalidation_test.go b/datavalidation_test.go index 758267db..5aea5832 100644 --- a/datavalidation_test.go +++ b/datavalidation_test.go @@ -5,7 +5,7 @@ // Package excelize 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.10 or later. +// charts of XLSX. This library needs Go version 1.15 or later. package excelize diff --git a/date.go b/date.go index 702f9fe0..3e50e3d3 100644 --- a/date.go +++ b/date.go @@ -7,7 +7,7 @@ // 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. This -// library needs Go version 1.10 or later. +// library needs Go version 1.15 or later. package excelize diff --git a/docProps.go b/docProps.go index f110cd81..bf294f29 100644 --- a/docProps.go +++ b/docProps.go @@ -7,7 +7,7 @@ // 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. This -// library needs Go version 1.10 or later. +// library needs Go version 1.15 or later. package excelize diff --git a/docProps_test.go b/docProps_test.go index 071e7efc..0cb6f71f 100644 --- a/docProps_test.go +++ b/docProps_test.go @@ -7,7 +7,7 @@ // 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. This -// library needs Go version 1.10 or later. +// library needs Go version 1.15 or later. package excelize diff --git a/drawing.go b/drawing.go index 9ee0b075..0e5d9480 100644 --- a/drawing.go +++ b/drawing.go @@ -7,7 +7,7 @@ // 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. This -// library needs Go version 1.10 or later. +// library needs Go version 1.15 or later. package excelize diff --git a/drawing_test.go b/drawing_test.go index 3c017050..1ee8fae3 100644 --- a/drawing_test.go +++ b/drawing_test.go @@ -7,7 +7,7 @@ // 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. This -// library needs Go version 1.10 or later. +// library needs Go version 1.15 or later. package excelize diff --git a/errors.go b/errors.go index 62b13123..0ab2642f 100644 --- a/errors.go +++ b/errors.go @@ -7,7 +7,7 @@ // 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. This -// library needs Go version 1.10 or later. +// library needs Go version 1.15 or later. package excelize diff --git a/excelize.go b/excelize.go index 1d4cf586..6b3d4062 100644 --- a/excelize.go +++ b/excelize.go @@ -7,7 +7,7 @@ // 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. This -// library needs Go version 1.10 or later. +// library needs Go version 1.15 or later. // // See https://xuri.me/excelize for more information about this package. package excelize diff --git a/file.go b/file.go index ab746459..8a37aefe 100644 --- a/file.go +++ b/file.go @@ -7,7 +7,7 @@ // 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. This -// library needs Go version 1.10 or later. +// library needs Go version 1.15 or later. package excelize diff --git a/go.mod b/go.mod index 8beb465f..0984d3a9 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/360EntSecGroup-Skylar/excelize/v2 -go 1.11 +go 1.15 require ( github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 diff --git a/lib.go b/lib.go index 10e8c771..0c1938aa 100644 --- a/lib.go +++ b/lib.go @@ -7,7 +7,7 @@ // 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. This -// library needs Go version 1.10 or later. +// library needs Go version 1.15 or later. package excelize diff --git a/merge.go b/merge.go index 76ea0690..1f8974ed 100644 --- a/merge.go +++ b/merge.go @@ -7,7 +7,7 @@ // 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. This -// library needs Go version 1.10 or later. +// library needs Go version 1.15 or later. package excelize diff --git a/picture.go b/picture.go index 02f92290..de7e0f85 100644 --- a/picture.go +++ b/picture.go @@ -7,7 +7,7 @@ // 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. This -// library needs Go version 1.10 or later. +// library needs Go version 1.15 or later. package excelize diff --git a/pivotTable.go b/pivotTable.go index 0dae4d16..11c2b31b 100644 --- a/pivotTable.go +++ b/pivotTable.go @@ -7,7 +7,7 @@ // 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. This -// library needs Go version 1.10 or later. +// library needs Go version 1.15 or later. package excelize diff --git a/rows.go b/rows.go index a354e2ae..76a8f67b 100644 --- a/rows.go +++ b/rows.go @@ -7,7 +7,7 @@ // 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. This -// library needs Go version 1.10 or later. +// library needs Go version 1.15 or later. package excelize diff --git a/shape.go b/shape.go index 5409a201..f7e2ef3d 100644 --- a/shape.go +++ b/shape.go @@ -7,7 +7,7 @@ // 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. This -// library needs Go version 1.10 or later. +// library needs Go version 1.15 or later. package excelize diff --git a/sheet.go b/sheet.go index 7b7a9461..8bbbc827 100644 --- a/sheet.go +++ b/sheet.go @@ -7,7 +7,7 @@ // 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. This -// library needs Go version 1.10 or later. +// library needs Go version 1.15 or later. package excelize diff --git a/sheetpr.go b/sheetpr.go index 2ea23940..8bc4bfe2 100644 --- a/sheetpr.go +++ b/sheetpr.go @@ -7,7 +7,7 @@ // 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. This -// library needs Go version 1.10 or later. +// library needs Go version 1.15 or later. package excelize diff --git a/sheetview.go b/sheetview.go index ad216b93..91df04c1 100644 --- a/sheetview.go +++ b/sheetview.go @@ -7,7 +7,7 @@ // 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. This -// library needs Go version 1.10 or later. +// library needs Go version 1.15 or later. package excelize diff --git a/sparkline.go b/sparkline.go index bf24843d..150c0eae 100644 --- a/sparkline.go +++ b/sparkline.go @@ -7,7 +7,7 @@ // 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. This -// library needs Go version 1.10 or later. +// library needs Go version 1.15 or later. package excelize diff --git a/stream.go b/stream.go index 2500aa8b..b0e5b533 100644 --- a/stream.go +++ b/stream.go @@ -7,7 +7,7 @@ // 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. This -// library needs Go version 1.10 or later. +// library needs Go version 1.15 or later. package excelize diff --git a/styles.go b/styles.go index c2489f28..d58281d7 100644 --- a/styles.go +++ b/styles.go @@ -7,7 +7,7 @@ // 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. This -// library needs Go version 1.10 or later. +// library needs Go version 1.15 or later. package excelize diff --git a/table.go b/table.go index 7b5eaacf..973a416f 100644 --- a/table.go +++ b/table.go @@ -7,7 +7,7 @@ // 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. This -// library needs Go version 1.10 or later. +// library needs Go version 1.15 or later. package excelize diff --git a/templates.go b/templates.go index 79852827..56588c45 100644 --- a/templates.go +++ b/templates.go @@ -7,7 +7,7 @@ // 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. This -// library needs Go version 1.10 or later. +// library needs Go version 1.15 or later. // // This file contains default templates for XML files we don't yet populated // based on content. diff --git a/vmlDrawing.go b/vmlDrawing.go index 5da188a8..58166fa6 100644 --- a/vmlDrawing.go +++ b/vmlDrawing.go @@ -7,7 +7,7 @@ // 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. This -// library needs Go version 1.10 or later. +// library needs Go version 1.15 or later. package excelize diff --git a/xmlApp.go b/xmlApp.go index 0146c544..fdb60084 100644 --- a/xmlApp.go +++ b/xmlApp.go @@ -7,7 +7,7 @@ // 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. This -// library needs Go version 1.10 or later. +// library needs Go version 1.15 or later. package excelize diff --git a/xmlCalcChain.go b/xmlCalcChain.go index 8af9f5b4..dfbb074e 100644 --- a/xmlCalcChain.go +++ b/xmlCalcChain.go @@ -7,7 +7,7 @@ // 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. This -// library needs Go version 1.10 or later. +// library needs Go version 1.15 or later. package excelize diff --git a/xmlChart.go b/xmlChart.go index 453b5d8d..637d9541 100644 --- a/xmlChart.go +++ b/xmlChart.go @@ -7,7 +7,7 @@ // 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. This -// library needs Go version 1.10 or later. +// library needs Go version 1.15 or later. package excelize diff --git a/xmlChartSheet.go b/xmlChartSheet.go index bd3d0630..4ef2dedd 100644 --- a/xmlChartSheet.go +++ b/xmlChartSheet.go @@ -7,7 +7,7 @@ // Package excelize 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.10 or later. +// charts of XLSX. This library needs Go version 1.15 or later. package excelize diff --git a/xmlComments.go b/xmlComments.go index 5573ddb0..e39fb243 100644 --- a/xmlComments.go +++ b/xmlComments.go @@ -7,7 +7,7 @@ // 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. This -// library needs Go version 1.10 or later. +// library needs Go version 1.15 or later. package excelize diff --git a/xmlContentTypes.go b/xmlContentTypes.go index 0edbcaf6..f429ef6b 100644 --- a/xmlContentTypes.go +++ b/xmlContentTypes.go @@ -7,7 +7,7 @@ // 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. This -// library needs Go version 1.10 or later. +// library needs Go version 1.15 or later. package excelize diff --git a/xmlCore.go b/xmlCore.go index 32cf916c..8ed8f304 100644 --- a/xmlCore.go +++ b/xmlCore.go @@ -7,7 +7,7 @@ // 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. This -// library needs Go version 1.10 or later. +// library needs Go version 1.15 or later. package excelize diff --git a/xmlDecodeDrawing.go b/xmlDecodeDrawing.go index 9176a99c..da333ef9 100644 --- a/xmlDecodeDrawing.go +++ b/xmlDecodeDrawing.go @@ -7,7 +7,7 @@ // 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. This -// library needs Go version 1.10 or later. +// library needs Go version 1.15 or later. package excelize diff --git a/xmlDrawing.go b/xmlDrawing.go index 73291c7e..a18c5886 100644 --- a/xmlDrawing.go +++ b/xmlDrawing.go @@ -7,7 +7,7 @@ // 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. This -// library needs Go version 1.10 or later. +// library needs Go version 1.15 or later. package excelize diff --git a/xmlPivotCache.go b/xmlPivotCache.go index 4dd42d8f..2812cf41 100644 --- a/xmlPivotCache.go +++ b/xmlPivotCache.go @@ -7,7 +7,7 @@ // 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. This -// library needs Go version 1.10 or later. +// library needs Go version 1.15 or later. package excelize diff --git a/xmlPivotTable.go b/xmlPivotTable.go index e187abad..53249910 100644 --- a/xmlPivotTable.go +++ b/xmlPivotTable.go @@ -7,7 +7,7 @@ // 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. This -// library needs Go version 1.10 or later. +// library needs Go version 1.15 or later. package excelize diff --git a/xmlSharedStrings.go b/xmlSharedStrings.go index 3c8bc1ed..7cb23fd5 100644 --- a/xmlSharedStrings.go +++ b/xmlSharedStrings.go @@ -7,7 +7,7 @@ // 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. This -// library needs Go version 1.10 or later. +// library needs Go version 1.15 or later. package excelize diff --git a/xmlStyles.go b/xmlStyles.go index 08f780ee..46604dc4 100644 --- a/xmlStyles.go +++ b/xmlStyles.go @@ -7,7 +7,7 @@ // 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. This -// library needs Go version 1.10 or later. +// library needs Go version 1.15 or later. package excelize diff --git a/xmlTable.go b/xmlTable.go index 9770e1b5..cb343bd3 100644 --- a/xmlTable.go +++ b/xmlTable.go @@ -7,7 +7,7 @@ // 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. This -// library needs Go version 1.10 or later. +// library needs Go version 1.15 or later. package excelize diff --git a/xmlTheme.go b/xmlTheme.go index 822e1ba3..ad557384 100644 --- a/xmlTheme.go +++ b/xmlTheme.go @@ -7,7 +7,7 @@ // 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. This -// library needs Go version 1.10 or later. +// library needs Go version 1.15 or later. package excelize diff --git a/xmlWorkbook.go b/xmlWorkbook.go index dd127f84..7151c6fd 100644 --- a/xmlWorkbook.go +++ b/xmlWorkbook.go @@ -7,7 +7,7 @@ // 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. This -// library needs Go version 1.10 or later. +// library needs Go version 1.15 or later. package excelize diff --git a/xmlWorksheet.go b/xmlWorksheet.go index 9079331a..edf57373 100644 --- a/xmlWorksheet.go +++ b/xmlWorksheet.go @@ -7,7 +7,7 @@ // 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. This -// library needs Go version 1.10 or later. +// library needs Go version 1.15 or later. package excelize