diff options
author | xuri <xuri.me@gmail.com> | 2021-03-30 23:02:22 +0800 |
---|---|---|
committer | xuri <xuri.me@gmail.com> | 2021-03-30 23:02:22 +0800 |
commit | 2af96c07149e2b79a06375bdc735c0a8c1f6646e (patch) | |
tree | 0755c027e1ef7a01ed414f7bc85b5045158c309f | |
parent | 6d7bd7cd8aaeba3a0969b6f035f0a5a53209a184 (diff) |
#65 fn: N, PERCENTILE.INC and T
typo fixed
-rw-r--r-- | adjust.go | 2 | ||||
-rw-r--r-- | calc.go | 60 | ||||
-rw-r--r-- | calc_test.go | 21 | ||||
-rw-r--r-- | calcchain.go | 4 | ||||
-rw-r--r-- | cell.go | 2 | ||||
-rw-r--r-- | chart.go | 2 | ||||
-rw-r--r-- | col.go | 2 | ||||
-rw-r--r-- | comment.go | 4 | ||||
-rw-r--r-- | comment_test.go | 2 | ||||
-rw-r--r-- | crypt_test.go | 2 | ||||
-rw-r--r-- | datavalidation.go | 4 | ||||
-rw-r--r-- | datavalidation_test.go | 2 | ||||
-rw-r--r-- | date.go | 4 | ||||
-rw-r--r-- | docProps.go | 4 | ||||
-rw-r--r-- | docProps_test.go | 14 | ||||
-rw-r--r-- | drawing.go | 2 | ||||
-rw-r--r-- | drawing_test.go | 12 | ||||
-rw-r--r-- | errors.go | 4 | ||||
-rw-r--r-- | excelize.go | 2 | ||||
-rw-r--r-- | excelize_test.go | 8 | ||||
-rw-r--r-- | file.go | 2 | ||||
-rw-r--r-- | lib.go | 2 | ||||
-rw-r--r-- | merge.go | 4 | ||||
-rw-r--r-- | picture.go | 2 | ||||
-rw-r--r-- | picture_test.go | 2 | ||||
-rw-r--r-- | pivotTable.go | 2 | ||||
-rw-r--r-- | rows.go | 2 | ||||
-rw-r--r-- | shape.go | 4 | ||||
-rw-r--r-- | sheet.go | 2 | ||||
-rw-r--r-- | sheetpr.go | 4 | ||||
-rw-r--r-- | sheetview.go | 4 | ||||
-rw-r--r-- | sparkline.go | 4 | ||||
-rw-r--r-- | sparkline_test.go | 2 | ||||
-rw-r--r-- | stream.go | 2 | ||||
-rw-r--r-- | stream_test.go | 2 | ||||
-rw-r--r-- | styles.go | 2 | ||||
-rw-r--r-- | styles_test.go | 4 | ||||
-rw-r--r-- | table.go | 2 | ||||
-rw-r--r-- | templates.go | 4 | ||||
-rw-r--r-- | vmlDrawing.go | 4 | ||||
-rw-r--r-- | xmlApp.go | 4 | ||||
-rw-r--r-- | xmlCalcChain.go | 4 | ||||
-rw-r--r-- | xmlChart.go | 4 | ||||
-rw-r--r-- | xmlComments.go | 4 | ||||
-rw-r--r-- | xmlContentTypes.go | 4 | ||||
-rw-r--r-- | xmlCore.go | 4 | ||||
-rw-r--r-- | xmlDecodeDrawing.go | 4 | ||||
-rw-r--r-- | xmlDrawing.go | 2 | ||||
-rw-r--r-- | xmlPivotCache.go | 4 | ||||
-rw-r--r-- | xmlPivotTable.go | 4 | ||||
-rw-r--r-- | xmlSharedStrings.go | 4 | ||||
-rw-r--r-- | xmlStyles.go | 4 | ||||
-rw-r--r-- | xmlTable.go | 2 | ||||
-rw-r--r-- | xmlTheme.go | 4 | ||||
-rw-r--r-- | xmlWorkbook.go | 4 | ||||
-rw-r--r-- | xmlWorksheet.go | 4 |
56 files changed, 177 insertions, 96 deletions
@@ -4,7 +4,7 @@ // // Package excelize 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 Exce™ 2007 and later. Supports +// 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. @@ -4,7 +4,7 @@ // // Package excelize 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 Exce™ 2007 and later. Supports +// 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. @@ -323,6 +323,7 @@ var tokenPriority = map[string]int{ // MROUND // MULTINOMIAL // MUNIT +// N // NA // NORM.DIST // NORMDIST @@ -339,6 +340,7 @@ var tokenPriority = map[string]int{ // OCT2HEX // ODD // OR +// PERCENTILE.INC // PERCENTILE // PERMUT // PERMUTATIONA @@ -380,6 +382,7 @@ var tokenPriority = map[string]int{ // SUM // SUMIF // SUMSQ +// T // TAN // TANH // TODAY @@ -4521,6 +4524,19 @@ func (fn *formulaFuncs) min(mina bool, argsList *list.List) formulaArg { return newNumberFormulaArg(min) } +// PERCENTILEdotINC function returns the k'th percentile (i.e. the value below +// which k% of the data values fall) for a supplied range of values and a +// supplied k. The syntax of the function is: +// +// PERCENTILE.INC(array,k) +// +func (fn *formulaFuncs) PERCENTILEdotINC(argsList *list.List) formulaArg { + if argsList.Len() != 2 { + return newErrorFormulaArg(formulaErrorVALUE, "PERCENTILE.INC requires 2 arguments") + } + return fn.PERCENTILE(argsList) +} + // PERCENTILE function returns the k'th percentile (i.e. the value below which // k% of the data values fall) for a supplied range of values and a supplied // k. The syntax of the function is: @@ -4858,6 +4874,28 @@ func (fn *formulaFuncs) ISTEXT(argsList *list.List) formulaArg { return newBoolFormulaArg(token.Type == ArgString) } +// N function converts data into a numeric value. The syntax of the function +// is: +// +// N(value) +// +func (fn *formulaFuncs) N(argsList *list.List) formulaArg { + if argsList.Len() != 1 { + return newErrorFormulaArg(formulaErrorVALUE, "N requires 1 argument") + } + token, num := argsList.Front().Value.(formulaArg), 0.0 + if token.Type == ArgError { + return token + } + if arg := token.ToNumber(); arg.Type == ArgNumber { + num = arg.Number + } + if token.Value() == "TRUE" { + num = 1 + } + return newNumberFormulaArg(num) +} + // NA function returns the Excel #N/A error. This error message has the // meaning 'value not available' and is produced when an Excel Formula is // unable to find a value that it needs. The syntax of the function is: @@ -4883,6 +4921,26 @@ func (fn *formulaFuncs) SHEET(argsList *list.List) formulaArg { return newNumberFormulaArg(float64(fn.f.GetSheetIndex(fn.sheet) + 1)) } +// T function tests if a supplied value is text and if so, returns the +// supplied text; Otherwise, the function returns an empty text string. The +// syntax of the function is: +// +// T(value) +// +func (fn *formulaFuncs) T(argsList *list.List) formulaArg { + if argsList.Len() != 1 { + return newErrorFormulaArg(formulaErrorVALUE, "T requires 1 argument") + } + token := argsList.Front().Value.(formulaArg) + if token.Type == ArgError { + return token + } + if token.Type == ArgNumber { + return newStringFormulaArg("") + } + return newStringFormulaArg(token.Value()) +} + // Logical Functions // AND function tests a number of supplied conditions and returns TRUE or diff --git a/calc_test.go b/calc_test.go index 1253ae0..935b3c2 100644 --- a/calc_test.go +++ b/calc_test.go @@ -680,6 +680,8 @@ func TestCalcCellValue(t *testing.T) { "=MINA(MUNIT(2))": "0", "=MINA(INT(1))": "1", "=MINA(A1:B4,MUNIT(1),INT(0),1,E1:F2,\"\")": "0", + // PERCENTILE.INC + "=PERCENTILE.INC(A1:A4,0.2)": "0.6", // PERCENTILE "=PERCENTILE(A1:A4,0.2)": "0.6", "=PERCENTILE(0,0)": "0", @@ -730,8 +732,17 @@ func TestCalcCellValue(t *testing.T) { // ISTEXT "=ISTEXT(D1)": "TRUE", "=ISTEXT(A1)": "FALSE", + // N + "=N(10)": "10", + "=N(\"10\")": "10", + "=N(\"x\")": "0", + "=N(TRUE)": "1", + "=N(FALSE)": "0", // SHEET - "SHEET()": "1", + "=SHEET()": "1", + // T + "=T(\"text\")": "text", + "=T(N(10))": "", // Logical Functions // AND "=AND(0)": "FALSE", @@ -1479,6 +1490,8 @@ func TestCalcCellValue(t *testing.T) { // MINA "=MINA()": "MINA requires at least 1 argument", "=MINA(NA())": "#N/A", + // PERCENTILE.INC + "=PERCENTILE.INC()": "PERCENTILE.INC requires 2 arguments", // PERCENTILE "=PERCENTILE()": "PERCENTILE requires 2 arguments", "=PERCENTILE(0,\"\")": "strconv.ParseFloat: parsing \"\": invalid syntax", @@ -1525,11 +1538,17 @@ func TestCalcCellValue(t *testing.T) { `=ISODD("text")`: "strconv.Atoi: parsing \"text\": invalid syntax", // ISTEXT "=ISTEXT()": "ISTEXT requires 1 argument", + // N + "=N()": "N requires 1 argument", + "=N(NA())": "#N/A", // NA "=NA()": "#N/A", "=NA(1)": "NA accepts no arguments", // SHEET "=SHEET(1)": "SHEET accepts no arguments", + // T + "=T()": "T requires 1 argument", + "=T(NA())": "#N/A", // Logical Functions // AND `=AND("text")`: "strconv.ParseFloat: parsing \"text\": invalid syntax", diff --git a/calcchain.go b/calcchain.go index 0350507..fdc4d3e 100644 --- a/calcchain.go +++ b/calcchain.go @@ -1,10 +1,10 @@ -// Copyright 2016 - 2020 The excelize Authors. All rights reserved. Use of +// Copyright 2016 - 2021 The excelize Authors. All rights reserved. Use of // this source code is governed by a BSD-style license that can be found in // the LICENSE file. // // Package excelize 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 Exce™ 2007 and later. Supports +// 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. @@ -4,7 +4,7 @@ // // Package excelize 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 Exce™ 2007 and later. Supports +// 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. @@ -4,7 +4,7 @@ // // Package excelize 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 Exce™ 2007 and later. Supports +// 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. @@ -4,7 +4,7 @@ // // Package excelize 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 Exce™ 2007 and later. Supports +// 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. @@ -1,10 +1,10 @@ -// Copyright 2016 - 2020 The excelize Authors. All rights reserved. Use of +// Copyright 2016 - 2021 The excelize Authors. All rights reserved. Use of // this source code is governed by a BSD-style license that can be found in // the LICENSE file. // // Package excelize 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 Exce™ 2007 and later. Supports +// 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. diff --git a/comment_test.go b/comment_test.go index 955d4e8..80ed0d0 100644 --- a/comment_test.go +++ b/comment_test.go @@ -1,4 +1,4 @@ -// Copyright 2016 - 2020 The excelize Authors. All rights reserved. Use of +// Copyright 2016 - 2021 The excelize Authors. All rights reserved. Use of // this source code is governed by a BSD-style license that can be found in // the LICENSE file. // diff --git a/crypt_test.go b/crypt_test.go index 6f712c1..2e35001 100644 --- a/crypt_test.go +++ b/crypt_test.go @@ -1,4 +1,4 @@ -// Copyright 2016 - 2020 The excelize Authors. All rights reserved. Use of +// Copyright 2016 - 2021 The excelize Authors. All rights reserved. Use of // this source code is governed by a BSD-style license that can be found in // the LICENSE file. // diff --git a/datavalidation.go b/datavalidation.go index 4cfb125..7d7de0a 100644 --- a/datavalidation.go +++ b/datavalidation.go @@ -1,10 +1,10 @@ -// Copyright 2016 - 2020 The excelize Authors. All rights reserved. Use of +// Copyright 2016 - 2021 The excelize Authors. All rights reserved. Use of // this source code is governed by a BSD-style license that can be found in // the LICENSE file. // // Package excelize 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 Exce™ 2007 and later. Supports +// 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. diff --git a/datavalidation_test.go b/datavalidation_test.go index d70b874..758267d 100644 --- a/datavalidation_test.go +++ b/datavalidation_test.go @@ -1,4 +1,4 @@ -// Copyright 2016 - 2020 The excelize Authors. All rights reserved. Use of +// Copyright 2016 - 2021 The excelize Authors. All rights reserved. Use of // this source code is governed by a BSD-style license that can be found in // the LICENSE file. // @@ -1,10 +1,10 @@ -// Copyright 2016 - 2020 The excelize Authors. All rights reserved. Use of +// Copyright 2016 - 2021 The excelize Authors. All rights reserved. Use of // this source code is governed by a BSD-style license that can be found in // the LICENSE file. // // Package excelize 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 Exce™ 2007 and later. Supports +// 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. diff --git a/docProps.go b/docProps.go index 03604c9..f110cd8 100644 --- a/docProps.go +++ b/docProps.go @@ -1,10 +1,10 @@ -// Copyright 2016 - 2020 The excelize Authors. All rights reserved. Use of +// Copyright 2016 - 2021 The excelize Authors. All rights reserved. Use of // this source code is governed by a BSD-style license that can be found in // the LICENSE file. // // Package excelize 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 Exce™ 2007 and later. Supports +// 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. diff --git a/docProps_test.go b/docProps_test.go index ef930ae..071e7ef 100644 --- a/docProps_test.go +++ b/docProps_test.go @@ -1,11 +1,13 @@ -// Copyright 2016 - 2020 The excelize Authors. All rights reserved. Use of +// Copyright 2016 - 2021 The excelize Authors. All rights reserved. Use of // this source code is governed by a BSD-style license that can be found in // the LICENSE file. // // 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. +// 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. package excelize @@ -43,7 +45,7 @@ func TestSetDocProps(t *testing.T) { f.XLSX["docProps/core.xml"] = nil assert.NoError(t, f.SetDocProps(&DocProperties{})) - // Test unsupport charset + // Test unsupported charset f = NewFile() f.XLSX["docProps/core.xml"] = MacintoshCyrillicCharset assert.EqualError(t, f.SetDocProps(&DocProperties{}), "xml decode error: XML syntax error on line 1: invalid UTF-8") @@ -61,7 +63,7 @@ func TestGetDocProps(t *testing.T) { _, err = f.GetDocProps() assert.NoError(t, err) - // Test unsupport charset + // Test unsupported charset f = NewFile() f.XLSX["docProps/core.xml"] = MacintoshCyrillicCharset _, err = f.GetDocProps() @@ -4,7 +4,7 @@ // // Package excelize 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 Exce™ 2007 and later. Supports +// 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. diff --git a/drawing_test.go b/drawing_test.go index 0a380ed..3c01705 100644 --- a/drawing_test.go +++ b/drawing_test.go @@ -1,11 +1,13 @@ -// Copyright 2016 - 2020 The excelize Authors. All rights reserved. Use of +// Copyright 2016 - 2021 The excelize Authors. All rights reserved. Use of // this source code is governed by a BSD-style license that can be found in // the LICENSE file. // // 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. +// 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. package excelize @@ -22,6 +24,6 @@ func TestDrawingParser(t *testing.T) { } // Test with one cell anchor f.drawingParser("wsDr") - // Test with unsupport charset + // Test with unsupported charset f.drawingParser("charset") } @@ -1,10 +1,10 @@ -// Copyright 2016 - 2020 The excelize Authors. All rights reserved. Use of +// Copyright 2016 - 2021 The excelize Authors. All rights reserved. Use of // this source code is governed by a BSD-style license that can be found in // the LICENSE file. // // Package excelize 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 Exce™ 2007 and later. Supports +// 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. diff --git a/excelize.go b/excelize.go index f45dcc0..1d4cf58 100644 --- a/excelize.go +++ b/excelize.go @@ -1,4 +1,4 @@ -// Copyright 2016 - 2020 The excelize Authors. All rights reserved. Use of +// Copyright 2016 - 2021 The excelize Authors. All rights reserved. Use of // this source code is governed by a BSD-style license that can be found in // the LICENSE file. diff --git a/excelize_test.go b/excelize_test.go index 0d0d587..f663ae0 100644 --- a/excelize_test.go +++ b/excelize_test.go @@ -1195,7 +1195,7 @@ func TestAddVBAProject(t *testing.T) { } func TestContentTypesReader(t *testing.T) { - // Test unsupport charset. + // Test unsupported charset. f := NewFile() f.ContentTypes = nil f.XLSX["[Content_Types].xml"] = MacintoshCyrillicCharset @@ -1203,7 +1203,7 @@ func TestContentTypesReader(t *testing.T) { } func TestWorkbookReader(t *testing.T) { - // Test unsupport charset. + // Test unsupported charset. f := NewFile() f.WorkBook = nil f.XLSX["xl/workbook.xml"] = MacintoshCyrillicCharset @@ -1211,7 +1211,7 @@ func TestWorkbookReader(t *testing.T) { } func TestWorkSheetReader(t *testing.T) { - // Test unsupport charset. + // Test unsupported charset. f := NewFile() delete(f.Sheet, "xl/worksheets/sheet1.xml") f.XLSX["xl/worksheets/sheet1.xml"] = MacintoshCyrillicCharset @@ -1228,7 +1228,7 @@ func TestWorkSheetReader(t *testing.T) { } func TestRelsReader(t *testing.T) { - // Test unsupport charset. + // Test unsupported charset. f := NewFile() rels := "xl/_rels/workbook.xml.rels" f.Relationships[rels] = nil @@ -4,7 +4,7 @@ // // Package excelize 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 Exce™ 2007 and later. Supports +// 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. @@ -4,7 +4,7 @@ // // Package excelize 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 Exce™ 2007 and later. Supports +// 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. @@ -1,10 +1,10 @@ -// Copyright 2016 - 2020 The excelize Authors. All rights reserved. Use of +// Copyright 2016 - 2021 The excelize Authors. All rights reserved. Use of // this source code is governed by a BSD-style license that can be found in // the LICENSE file. // // Package excelize 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 Exce™ 2007 and later. Supports +// 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. @@ -4,7 +4,7 @@ // // Package excelize 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 Exce™ 2007 and later. Supports +// 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. diff --git a/picture_test.go b/picture_test.go index 58f7a81..28d8aa8 100644 --- a/picture_test.go +++ b/picture_test.go @@ -80,7 +80,7 @@ func TestAddPictureErrors(t *testing.T) { assert.True(t, os.IsNotExist(err), "Expected os.IsNotExist(err) == true") } - // Test add picture to worksheet with unsupport file type. + // Test add picture to worksheet with unsupported file type. err = xlsx.AddPicture("Sheet1", "G21", filepath.Join("test", "Book1.xlsx"), "") assert.EqualError(t, err, "unsupported image extension") diff --git a/pivotTable.go b/pivotTable.go index 9df8c64..0dae4d1 100644 --- a/pivotTable.go +++ b/pivotTable.go @@ -4,7 +4,7 @@ // // Package excelize 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 Exce™ 2007 and later. Supports +// 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. @@ -4,7 +4,7 @@ // // Package excelize 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 Exce™ 2007 and later. Supports +// 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. @@ -1,10 +1,10 @@ -// Copyright 2016 - 2020 The excelize Authors. All rights reserved. Use of +// Copyright 2016 - 2021 The excelize Authors. All rights reserved. Use of // this source code is governed by a BSD-style license that can be found in // the LICENSE file. // // Package excelize 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 Exce™ 2007 and later. Supports +// 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. @@ -4,7 +4,7 @@ // // Package excelize 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 Exce™ 2007 and later. Supports +// 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. @@ -1,10 +1,10 @@ -// Copyright 2016 - 2020 The excelize Authors. All rights reserved. Use of +// Copyright 2016 - 2021 The excelize Authors. All rights reserved. Use of // this source code is governed by a BSD-style license that can be found in // the LICENSE file. // // Package excelize 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 Exce™ 2007 and later. Supports +// 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. diff --git a/sheetview.go b/sheetview.go index 0a8fd5c..ad216b9 100644 --- a/sheetview.go +++ b/sheetview.go @@ -1,10 +1,10 @@ -// Copyright 2016 - 2020 The excelize Authors. All rights reserved. Use of +// Copyright 2016 - 2021 The excelize Authors. All rights reserved. Use of // this source code is governed by a BSD-style license that can be found in // the LICENSE file. // // Package excelize 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 Exce™ 2007 and later. Supports +// 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. diff --git a/sparkline.go b/sparkline.go index b42207c..bf24843 100644 --- a/sparkline.go +++ b/sparkline.go @@ -1,10 +1,10 @@ -// Copyright 2016 - 2020 The excelize Authors. All rights reserved. Use of +// Copyright 2016 - 2021 The excelize Authors. All rights reserved. Use of // this source code is governed by a BSD-style license that can be found in // the LICENSE file. // // Package excelize 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 Exce™ 2007 and later. Supports +// 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. diff --git a/sparkline_test.go b/sparkline_test.go index 45d3d72..eac9824 100644 --- a/sparkline_test.go +++ b/sparkline_test.go @@ -270,7 +270,7 @@ func TestAddSparkline(t *testing.T) { } func TestAppendSparkline(t *testing.T) { - // Test unsupport charset. + // Test unsupported charset. f := NewFile() ws, err := f.workSheetReader("Sheet1") assert.NoError(t, err) @@ -4,7 +4,7 @@ // // Package excelize 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 Exce™ 2007 and later. Supports +// 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. diff --git a/stream_test.go b/stream_test.go index c5febfc..322eea9 100644 --- a/stream_test.go +++ b/stream_test.go @@ -94,7 +94,7 @@ func TestStreamWriter(t *testing.T) { assert.NoError(t, streamWriter.rawData.tmp.Close()) assert.NoError(t, os.Remove(streamWriter.rawData.tmp.Name())) - // Test unsupport charset + // Test unsupported charset file = NewFile() delete(file.Sheet, "xl/worksheets/sheet1.xml") file.XLSX["xl/worksheets/sheet1.xml"] = MacintoshCyrillicCharset @@ -4,7 +4,7 @@ // // Package excelize 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 Exce™ 2007 and later. Supports +// 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. diff --git a/styles_test.go b/styles_test.go index 02a48cc..d3fde0c 100644 --- a/styles_test.go +++ b/styles_test.go @@ -259,7 +259,7 @@ func TestSetDefaultFont(t *testing.T) { func TestStylesReader(t *testing.T) { f := NewFile() - // Test read styles with unsupport charset. + // Test read styles with unsupported charset. f.Styles = nil f.XLSX["xl/styles.xml"] = MacintoshCyrillicCharset assert.EqualValues(t, new(xlsxStyleSheet), f.stylesReader()) @@ -267,7 +267,7 @@ func TestStylesReader(t *testing.T) { func TestThemeReader(t *testing.T) { f := NewFile() - // Test read theme with unsupport charset. + // Test read theme with unsupported charset. f.XLSX["xl/theme/theme1.xml"] = MacintoshCyrillicCharset assert.EqualValues(t, new(xlsxTheme), f.themeReader()) } @@ -4,7 +4,7 @@ // // Package excelize 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 Exce™ 2007 and later. Supports +// 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. diff --git a/templates.go b/templates.go index 5721150..7985282 100644 --- a/templates.go +++ b/templates.go @@ -1,10 +1,10 @@ -// Copyright 2016 - 2020 The excelize Authors. All rights reserved. Use of +// Copyright 2016 - 2021 The excelize Authors. All rights reserved. Use of // this source code is governed by a BSD-style license that can be found in // the LICENSE file. // // Package excelize 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 Exce™ 2007 and later. Supports +// 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. diff --git a/vmlDrawing.go b/vmlDrawing.go index 185df28..5da188a 100644 --- a/vmlDrawing.go +++ b/vmlDrawing.go @@ -1,10 +1,10 @@ -// Copyright 2016 - 2020 The excelize Authors. All rights reserved. Use of +// Copyright 2016 - 2021 The excelize Authors. All rights reserved. Use of // this source code is governed by a BSD-style license that can be found in // the LICENSE file. // // Package excelize 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 Exce™ 2007 and later. Supports +// 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. @@ -1,10 +1,10 @@ -// Copyright 2016 - 2020 The excelize Authors. All rights reserved. Use of +// Copyright 2016 - 2021 The excelize Authors. All rights reserved. Use of // this source code is governed by a BSD-style license that can be found in // the LICENSE file. // // Package excelize 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 Exce™ 2007 and later. Supports +// 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. diff --git a/xmlCalcChain.go b/xmlCalcChain.go index 401bb5e..8af9f5b 100644 --- a/xmlCalcChain.go +++ b/xmlCalcChain.go @@ -1,10 +1,10 @@ -// Copyright 2016 - 2020 The excelize Authors. All rights reserved. Use of +// Copyright 2016 - 2021 The excelize Authors. All rights reserved. Use of // this source code is governed by a BSD-style license that can be found in // the LICENSE file. // // Package excelize 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 Exce™ 2007 and later. Supports +// 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. diff --git a/xmlChart.go b/xmlChart.go index ee2ad29..453b5d8 100644 --- a/xmlChart.go +++ b/xmlChart.go @@ -1,10 +1,10 @@ -// Copyright 2016 - 2020 The excelize Authors. All rights reserved. Use of +// Copyright 2016 - 2021 The excelize Authors. All rights reserved. Use of // this source code is governed by a BSD-style license that can be found in // the LICENSE file. // // Package excelize 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 Exce™ 2007 and later. Supports +// 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. diff --git a/xmlComments.go b/xmlComments.go index f2b03a1..5573ddb 100644 --- a/xmlComments.go +++ b/xmlComments.go @@ -1,10 +1,10 @@ -// Copyright 2016 - 2020 The excelize Authors. All rights reserved. Use of +// Copyright 2016 - 2021 The excelize Authors. All rights reserved. Use of // this source code is governed by a BSD-style license that can be found in // the LICENSE file. // // Package excelize 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 Exce™ 2007 and later. Supports +// 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. diff --git a/xmlContentTypes.go b/xmlContentTypes.go index 458b117..0edbcaf 100644 --- a/xmlContentTypes.go +++ b/xmlContentTypes.go @@ -1,10 +1,10 @@ -// Copyright 2016 - 2020 The excelize Authors. All rights reserved. Use of +// Copyright 2016 - 2021 The excelize Authors. All rights reserved. Use of // this source code is governed by a BSD-style license that can be found in // the LICENSE file. // // Package excelize 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 Exce™ 2007 and later. Supports +// 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. @@ -1,10 +1,10 @@ -// Copyright 2016 - 2020 The excelize Authors. All rights reserved. Use of +// Copyright 2016 - 2021 The excelize Authors. All rights reserved. Use of // this source code is governed by a BSD-style license that can be found in // the LICENSE file. // // Package excelize 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 Exce™ 2007 and later. Supports +// 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. diff --git a/xmlDecodeDrawing.go b/xmlDecodeDrawing.go index 8aa22db..9176a99 100644 --- a/xmlDecodeDrawing.go +++ b/xmlDecodeDrawing.go @@ -1,10 +1,10 @@ -// Copyright 2016 - 2020 The excelize Authors. All rights reserved. Use of +// Copyright 2016 - 2021 The excelize Authors. All rights reserved. Use of // this source code is governed by a BSD-style license that can be found in // the LICENSE file. // // Package excelize 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 Exce™ 2007 and later. Supports +// 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. diff --git a/xmlDrawing.go b/xmlDrawing.go index 76d7e17..73291c7 100644 --- a/xmlDrawing.go +++ b/xmlDrawing.go @@ -4,7 +4,7 @@ // // Package excelize 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 Exce™ 2007 and later. Supports +// 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. diff --git a/xmlPivotCache.go b/xmlPivotCache.go index 58d977a..4dd42d8 100644 --- a/xmlPivotCache.go +++ b/xmlPivotCache.go @@ -1,10 +1,10 @@ -// Copyright 2016 - 2020 The excelize Authors. All rights reserved. Use of +// Copyright 2016 - 2021 The excelize Authors. All rights reserved. Use of // this source code is governed by a BSD-style license that can be found in // the LICENSE file. // // Package excelize 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 Exce™ 2007 and later. Supports +// 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. diff --git a/xmlPivotTable.go b/xmlPivotTable.go index 9c4be50..e187aba 100644 --- a/xmlPivotTable.go +++ b/xmlPivotTable.go @@ -1,10 +1,10 @@ -// Copyright 2016 - 2020 The excelize Authors. All rights reserved. Use of +// Copyright 2016 - 2021 The excelize Authors. All rights reserved. Use of // this source code is governed by a BSD-style license that can be found in // the LICENSE file. // // Package excelize 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 Exce™ 2007 and later. Supports +// 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. diff --git a/xmlSharedStrings.go b/xmlSharedStrings.go index c9f311b..3c8bc1e 100644 --- a/xmlSharedStrings.go +++ b/xmlSharedStrings.go @@ -1,10 +1,10 @@ -// Copyright 2016 - 2020 The excelize Authors. All rights reserved. Use of +// Copyright 2016 - 2021 The excelize Authors. All rights reserved. Use of // this source code is governed by a BSD-style license that can be found in // the LICENSE file. // // Package excelize 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 Exce™ 2007 and later. Supports +// 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. diff --git a/xmlStyles.go b/xmlStyles.go index 0670b59..08f780e 100644 --- a/xmlStyles.go +++ b/xmlStyles.go @@ -1,10 +1,10 @@ -// Copyright 2016 - 2020 The excelize Authors. All rights reserved. Use of +// Copyright 2016 - 2021 The excelize Authors. All rights reserved. Use of // this source code is governed by a BSD-style license that can be found in // the LICENSE file. // // Package excelize 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 Exce™ 2007 and later. Supports +// 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. diff --git a/xmlTable.go b/xmlTable.go index c48720b..9770e1b 100644 --- a/xmlTable.go +++ b/xmlTable.go @@ -4,7 +4,7 @@ // // Package excelize 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 Exce™ 2007 and later. Supports +// 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. diff --git a/xmlTheme.go b/xmlTheme.go index e3588dc..822e1ba 100644 --- a/xmlTheme.go +++ b/xmlTheme.go @@ -1,10 +1,10 @@ -// Copyright 2016 - 2020 The excelize Authors. All rights reserved. Use of +// Copyright 2016 - 2021 The excelize Authors. All rights reserved. Use of // this source code is governed by a BSD-style license that can be found in // the LICENSE file. // // Package excelize 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 Exce™ 2007 and later. Supports +// 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. diff --git a/xmlWorkbook.go b/xmlWorkbook.go index b25165b..dd127f8 100644 --- a/xmlWorkbook.go +++ b/xmlWorkbook.go @@ -1,10 +1,10 @@ -// Copyright 2016 - 2020 The excelize Authors. All rights reserved. Use of +// Copyright 2016 - 2021 The excelize Authors. All rights reserved. Use of // this source code is governed by a BSD-style license that can be found in // the LICENSE file. // // Package excelize 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 Exce™ 2007 and later. Supports +// 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. diff --git a/xmlWorksheet.go b/xmlWorksheet.go index b31eec1..9079331 100644 --- a/xmlWorksheet.go +++ b/xmlWorksheet.go @@ -1,10 +1,10 @@ -// Copyright 2016 - 2020 The excelize Authors. All rights reserved. Use of +// Copyright 2016 - 2021 The excelize Authors. All rights reserved. Use of // this source code is governed by a BSD-style license that can be found in // the LICENSE file. // // Package excelize 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 Exce™ 2007 and later. Supports +// 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. |