summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxuri <xuri.me@gmail.com>2021-04-04 15:29:43 +0800
committerxuri <xuri.me@gmail.com>2021-04-04 15:29:43 +0800
commitf8f699a172bd0219a8736b19091dd3eaa9eb3b25 (patch)
tree5f268eed0b3979f175a49d508fee8409a32a6f7f
parent89c262fc1d525f74bb0e2fb61ae7a3d10d07a12a (diff)
Go 1.15 and later required, #65 fn: IMABS, IMCOS, IMCOSH, IMCOT, IMCSC, IMCSCH, IMEXP, IMLN and IMLOG10
-rw-r--r--.travis.yml4
-rw-r--r--README.md2
-rw-r--r--README_zh.md2
-rw-r--r--adjust.go2
-rw-r--r--calc.go206
-rw-r--r--calc_test.go71
-rw-r--r--calcchain.go2
-rw-r--r--cell.go2
-rw-r--r--chart.go2
-rw-r--r--col.go2
-rw-r--r--comment.go2
-rw-r--r--comment_test.go2
-rw-r--r--crypt.go2
-rw-r--r--crypt_test.go2
-rw-r--r--datavalidation.go2
-rw-r--r--datavalidation_test.go2
-rw-r--r--date.go2
-rw-r--r--docProps.go2
-rw-r--r--docProps_test.go2
-rw-r--r--drawing.go2
-rw-r--r--drawing_test.go2
-rw-r--r--errors.go2
-rw-r--r--excelize.go2
-rw-r--r--file.go2
-rw-r--r--go.mod2
-rw-r--r--lib.go2
-rw-r--r--merge.go2
-rw-r--r--picture.go2
-rw-r--r--pivotTable.go2
-rw-r--r--rows.go2
-rw-r--r--shape.go2
-rw-r--r--sheet.go2
-rw-r--r--sheetpr.go2
-rw-r--r--sheetview.go2
-rw-r--r--sparkline.go2
-rw-r--r--stream.go2
-rw-r--r--styles.go2
-rw-r--r--table.go2
-rw-r--r--templates.go2
-rw-r--r--vmlDrawing.go2
-rw-r--r--xmlApp.go2
-rw-r--r--xmlCalcChain.go2
-rw-r--r--xmlChart.go2
-rw-r--r--xmlChartSheet.go2
-rw-r--r--xmlComments.go2
-rw-r--r--xmlContentTypes.go2
-rw-r--r--xmlCore.go2
-rw-r--r--xmlDecodeDrawing.go2
-rw-r--r--xmlDrawing.go2
-rw-r--r--xmlPivotCache.go2
-rw-r--r--xmlPivotTable.go2
-rw-r--r--xmlSharedStrings.go2
-rw-r--r--xmlStyles.go2
-rw-r--r--xmlTable.go2
-rw-r--r--xmlTheme.go2
-rw-r--r--xmlWorkbook.go2
-rw-r--r--xmlWorksheet.go2
57 files changed, 328 insertions, 61 deletions
diff --git a/.travis.yml b/.travis.yml
index f302eed..34ce8ee 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 44fc57a..ce7cf3d 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&trade; 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&trade; 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 1118367..cf9888b 100644
--- a/README_zh.md
+++ b/README_zh.md
@@ -13,7 +13,7 @@
## 简介
-Excelize 是 Go 语言编写的用于操作 Office Excel 文档基础库,基于 ECMA-376,ISO/IEC 29500 国际标准。可以使用它来读取、写入由 Microsoft Excel&trade; 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&trade; 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 3694fb6..e06d4f6 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 ae22c02..9cb67a1 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 2abeec0..5fbc6a3 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 fdc4d3e..ea3080f 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 fd8772f..27d24d9 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 d22cdb0..1e2e046 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 40ef45f..09a172a 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 7e6d31f..3c48d61 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 80ed0d0..ee8b826 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 5ecdf33..88abd0e 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 2e35001..6a882e5 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 7d7de0a..0f8508b 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 758267d..5aea583 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 702f9fe..3e50e3d 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 f110cd8..bf294f2 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 071e7ef..0cb6f71 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 9ee0b07..0e5d948 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 3c01705..1ee8fae 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 62b1312..0ab2642 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 1d4cf58..6b3d406 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 ab74645..8a37aef 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 8beb465..0984d3a 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 10e8c77..0c1938a 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 76ea069..1f8974e 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 02f9229..de7e0f8 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 0dae4d1..11c2b31 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 a354e2a..76a8f67 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 5409a20..f7e2ef3 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 7b7a946..8bbbc82 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 2ea2394..8bc4bfe 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 ad216b9..91df04c 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 bf24843..150c0ea 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 2500aa8..b0e5b53 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 c2489f2..d58281d 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 7b5eaac..973a416 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 7985282..56588c4 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 5da188a..58166fa 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 0146c54..fdb6008 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 8af9f5b..dfbb074 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 453b5d8..637d954 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 bd3d063..4ef2ded 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 5573ddb..e39fb24 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 0edbcaf..f429ef6 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 32cf916..8ed8f30 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 9176a99..da333ef 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 73291c7..a18c588 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 4dd42d8..2812cf4 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 e187aba..5324991 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 3c8bc1e..7cb23fd 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 08f780e..46604dc 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 9770e1b..cb343bd 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 822e1ba..ad55738 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 dd127f8..7151c6f 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 9079331..edf5737 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