diff options
author | xuri <xuri.me@gmail.com> | 2019-01-01 13:20:14 +0800 |
---|---|---|
committer | xuri <xuri.me@gmail.com> | 2019-01-01 13:20:14 +0800 |
commit | fabd9d013f7d18cfc77e374a603a26995fdf091d (patch) | |
tree | 95d5e1be62c5d921f3f31b573c11b6ad794c4d1a | |
parent | 34ee74b72a909da32d3b7362176905457fe2469d (diff) |
README updated
-rw-r--r-- | LICENSE | 2 | ||||
-rw-r--r-- | README.md | 10 | ||||
-rw-r--r-- | README_zh.md | 4 | ||||
-rw-r--r-- | cell.go | 2 | ||||
-rw-r--r-- | chart.go | 2 | ||||
-rw-r--r-- | col.go | 2 | ||||
-rw-r--r-- | comment.go | 2 | ||||
-rw-r--r-- | datavalidation.go | 2 | ||||
-rw-r--r-- | datavalidation_test.go | 2 | ||||
-rw-r--r-- | date.go | 2 | ||||
-rw-r--r-- | excelize.go | 2 | ||||
-rw-r--r-- | excelize_test.go | 17 | ||||
-rw-r--r-- | file.go | 2 | ||||
-rw-r--r-- | lib.go | 2 | ||||
-rw-r--r-- | picture.go | 2 | ||||
-rw-r--r-- | rows.go | 2 | ||||
-rw-r--r-- | shape.go | 2 | ||||
-rw-r--r-- | sheet.go | 2 | ||||
-rw-r--r-- | sheetpr.go | 2 | ||||
-rw-r--r-- | sheetview.go | 2 | ||||
-rw-r--r-- | styles.go | 2 | ||||
-rw-r--r-- | table.go | 2 | ||||
-rw-r--r-- | templates.go | 2 | ||||
-rw-r--r-- | vmlDrawing.go | 2 | ||||
-rw-r--r-- | xmlChart.go | 2 | ||||
-rw-r--r-- | xmlComments.go | 2 | ||||
-rw-r--r-- | xmlContentTypes.go | 2 | ||||
-rw-r--r-- | xmlDecodeDrawing.go | 2 | ||||
-rw-r--r-- | xmlDrawing.go | 2 | ||||
-rw-r--r-- | xmlSharedStrings.go | 2 | ||||
-rw-r--r-- | xmlStyles.go | 2 | ||||
-rw-r--r-- | xmlTable.go | 2 | ||||
-rw-r--r-- | xmlTheme.go | 2 | ||||
-rw-r--r-- | xmlWorkbook.go | 2 | ||||
-rw-r--r-- | xmlWorksheet.go | 2 |
35 files changed, 54 insertions, 41 deletions
@@ -1,6 +1,6 @@ BSD 3-Clause License -Copyright (c) 2016 - 2018 360 Enterprise Security Group, Endpoint Security, +Copyright (c) 2016 - 2019 360 Enterprise Security Group, Endpoint Security, inc. All rights reserved. Redistribution and use in source and binary forms, with or without @@ -3,21 +3,17 @@ <p align="center"> <a href="https://travis-ci.org/360EntSecGroup-Skylar/excelize"><img src="https://travis-ci.org/360EntSecGroup-Skylar/excelize.svg?branch=master" alt="Build Status"></a> <a href="https://codecov.io/gh/360EntSecGroup-Skylar/excelize"><img src="https://codecov.io/gh/360EntSecGroup-Skylar/excelize/branch/master/graph/badge.svg" alt="Code Coverage"></a> -<a href="https://app.fossa.io/projects/git%2Bgithub.com%2F360EntSecGroup-Skylar%2Fexcelize?ref=badge_shield" alt="FOSSA Status"><img src="https://app.fossa.io/api/projects/git%2Bgithub.com%2F360EntSecGroup-Skylar%2Fexcelize.svg?type=shield"/></a> <a href="https://goreportcard.com/report/github.com/360EntSecGroup-Skylar/excelize"><img src="https://goreportcard.com/badge/github.com/360EntSecGroup-Skylar/excelize" alt="Go Report Card"></a> <a href="https://godoc.org/github.com/360EntSecGroup-Skylar/excelize"><img src="https://godoc.org/github.com/360EntSecGroup-Skylar/excelize?status.svg" alt="GoDoc"></a> <a href="https://opensource.org/licenses/BSD-3-Clause"><img src="https://img.shields.io/badge/license-bsd-orange.svg" alt="Licenses"></a> <a href="https://www.paypal.me/xuri"><img src="https://img.shields.io/badge/Donate-PayPal-green.svg" alt="Donate"></a> </p> - -[](https://app.fossa.io/projects/git%2Bgithub.com%2F360EntSecGroup-Skylar%2Fexcelize?ref=badge_large) - # Excelize ## Introduction -Excelize is a library written in pure Go and providing a set of functions that allow you to write to and read from XLSX files. Support reads and writes XLSX file generated by Microsoft Excel™ 2007 and later. Support save file without losing original charts of XLSX. This library needs Go version 1.8 or later. The full API docs can be seen using go's built-in documentation tool, or online at [godoc.org](https://godoc.org/github.com/360EntSecGroup-Skylar/excelize) and [docs reference](https://xuri.me/excelize/). +Excelize is a library written in pure Go and providing a set of functions that allow you to write to and read from XLSX files. Support reads and writes XLSX file generated by Microsoft Excel™ 2007 and later. Support save file without losing original charts of XLSX. This library needs Go version 1.8 or later. The full API docs can be seen using go's built-in documentation tool, or online at [godoc.org](https://godoc.org/github.com/360EntSecGroup-Skylar/excelize) and [docs reference](https://xuri.me/excelize/). ## Basic Usage @@ -178,4 +174,6 @@ Some struct of XML originally by [tealeg/xlsx](https://github.com/tealeg/xlsx). ## Licenses -This program is under the terms of the BSD 3-Clause License. See [https://opensource.org/licenses/BSD-3-Clause](https://opensource.org/licenses/BSD-3-Clause).
\ No newline at end of file +This program is under the terms of the BSD 3-Clause License. See [https://opensource.org/licenses/BSD-3-Clause](https://opensource.org/licenses/BSD-3-Clause). + +[](https://app.fossa.io/projects/git%2Bgithub.com%2F360EntSecGroup-Skylar%2Fexcelize?ref=badge_large) diff --git a/README_zh.md b/README_zh.md index 6be0f92..6fbbb00 100644 --- a/README_zh.md +++ b/README_zh.md @@ -13,7 +13,7 @@ ## 简介 -Excelize 是 Go 语言编写的用于操作 Office Excel 文档类库,基于 ECMA-376 Office OpenXML 标准。可以使用它来读取、写入由 Microsoft Excel™ 2007 及以上版本创建的 XLSX 文档。相比较其他的开源类库,Excelize 支持写入原本带有图片(表)、透视表和切片器等复杂样式的文档,还支持向 Excel 文档中插入图片与图表,并且在保存后不会丢失文档原有样式,可以应用于各类报表系统中。使用本类库要求使用的 Go 语言为 1.8 或更高版本,完整的 API 使用文档请访问 [godoc.org](https://godoc.org/github.com/360EntSecGroup-Skylar/excelize) 或查看 [参考文档](https://xuri.me/excelize/)。 +Excelize 是 Go 语言编写的用于操作 Office Excel 文档类库,基于 ECMA-376 Office OpenXML 标准。可以使用它来读取、写入由 Microsoft Excel™ 2007 及以上版本创建的 XLSX 文档。相比较其他的开源类库,Excelize 支持写入原本带有图片(表)、透视表和切片器等复杂样式的文档,还支持向 Excel 文档中插入图片与图表,并且在保存后不会丢失文档原有样式,可以应用于各类报表系统中。使用本类库要求使用的 Go 语言为 1.8 或更高版本,完整的 API 使用文档请访问 [godoc.org](https://godoc.org/github.com/360EntSecGroup-Skylar/excelize) 或查看 [参考文档](https://xuri.me/excelize/)。 ## 快速上手 @@ -175,3 +175,5 @@ func main() { ## 开源许可 本项目遵循 BSD 3-Clause 开源许可协议,访问 [https://opensource.org/licenses/BSD-3-Clause](https://opensource.org/licenses/BSD-3-Clause) 查看许可协议文件。 + +[](https://app.fossa.io/projects/git%2Bgithub.com%2F360EntSecGroup-Skylar%2Fexcelize?ref=badge_large) @@ -1,4 +1,4 @@ -// Copyright 2016 - 2018 The excelize Authors. All rights reserved. Use of +// Copyright 2016 - 2019 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,4 +1,4 @@ -// Copyright 2016 - 2018 The excelize Authors. All rights reserved. Use of +// Copyright 2016 - 2019 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,4 +1,4 @@ -// Copyright 2016 - 2018 The excelize Authors. All rights reserved. Use of +// Copyright 2016 - 2019 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,4 +1,4 @@ -// Copyright 2016 - 2018 The excelize Authors. All rights reserved. Use of +// Copyright 2016 - 2019 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 5ebd61f..0a95251 100644 --- a/datavalidation.go +++ b/datavalidation.go @@ -1,4 +1,4 @@ -// Copyright 2016 - 2018 The excelize Authors. All rights reserved. Use of +// Copyright 2016 - 2019 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_test.go b/datavalidation_test.go index e0d4a00..82bc42f 100644 --- a/datavalidation_test.go +++ b/datavalidation_test.go @@ -1,4 +1,4 @@ -// Copyright 2016 - 2018 The excelize Authors. All rights reserved. Use of +// Copyright 2016 - 2019 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,4 +1,4 @@ -// Copyright 2016 - 2018 The excelize Authors. All rights reserved. Use of +// Copyright 2016 - 2019 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.go b/excelize.go index 35ff75a..60480c8 100644 --- a/excelize.go +++ b/excelize.go @@ -1,4 +1,4 @@ -// Copyright 2016 - 2018 The excelize Authors. All rights reserved. Use of +// Copyright 2016 - 2019 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 1411371..1b6997a 100644 --- a/excelize_test.go +++ b/excelize_test.go @@ -129,6 +129,19 @@ func TestOpenFile(t *testing.T) { assert.NoError(t, xlsx.SaveAs("./test/TestOpenFile.xlsx")) } +func TestSaveFile(t *testing.T) { + xlsx, err := OpenFile("./test/Book1.xlsx") + if !assert.NoError(t, err) { + t.FailNow() + } + assert.NoError(t, xlsx.SaveAs("./test/TestSaveFile.xlsx")) + xlsx, err = OpenFile("./test/TestSaveFile.xlsx") + if !assert.NoError(t, err) { + t.FailNow() + } + assert.NoError(t, xlsx.Save()) +} + func TestSaveAsWrongPath(t *testing.T) { xlsx, err := OpenFile("./test/Book1.xlsx") if assert.NoError(t, err) { @@ -309,7 +322,7 @@ func TestGetCellHyperLink(t *testing.T) { link, target := xlsx.GetCellHyperLink("Sheet1", "") t.Log(link, target) - link, target = xlsx.GetCellHyperLink("Sheet1", "B19") + link, target = xlsx.GetCellHyperLink("Sheet1", "A22") t.Log(link, target) link, target = xlsx.GetCellHyperLink("Sheet2", "D6") t.Log(link, target) @@ -1082,7 +1095,7 @@ func TestInsertRow(t *testing.T) { func TestDuplicateRow(t *testing.T) { const ( - file = "./test/TestDuplicateRow" + + file = "./test/TestDuplicateRow" + ".%s.xlsx" sheet = "Sheet1" a1 = "A1" @@ -1,4 +1,4 @@ -// Copyright 2016 - 2018 The excelize Authors. All rights reserved. Use of +// Copyright 2016 - 2019 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,4 +1,4 @@ -// Copyright 2016 - 2018 The excelize Authors. All rights reserved. Use of +// Copyright 2016 - 2019 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,4 +1,4 @@ -// Copyright 2016 - 2018 The excelize Authors. All rights reserved. Use of +// Copyright 2016 - 2019 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,4 +1,4 @@ -// Copyright 2016 - 2018 The excelize Authors. All rights reserved. Use of +// Copyright 2016 - 2019 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,4 +1,4 @@ -// Copyright 2016 - 2018 The excelize Authors. All rights reserved. Use of +// Copyright 2016 - 2019 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,4 +1,4 @@ -// Copyright 2016 - 2018 The excelize Authors. All rights reserved. Use of +// Copyright 2016 - 2019 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,4 +1,4 @@ -// Copyright 2016 - 2018 The excelize Authors. All rights reserved. Use of +// Copyright 2016 - 2019 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/sheetview.go b/sheetview.go index 37a0c39..6b191e9 100644 --- a/sheetview.go +++ b/sheetview.go @@ -1,4 +1,4 @@ -// Copyright 2016 - 2018 The excelize Authors. All rights reserved. Use of +// Copyright 2016 - 2019 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,4 +1,4 @@ -// Copyright 2016 - 2018 The excelize Authors. All rights reserved. Use of +// Copyright 2016 - 2019 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,4 +1,4 @@ -// Copyright 2016 - 2018 The excelize Authors. All rights reserved. Use of +// Copyright 2016 - 2019 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/templates.go b/templates.go index 1d0655d..17fc8d4 100644 --- a/templates.go +++ b/templates.go @@ -1,4 +1,4 @@ -// Copyright 2016 - 2018 The excelize Authors. All rights reserved. Use of +// Copyright 2016 - 2019 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/vmlDrawing.go b/vmlDrawing.go index c17dde7..8b1d00f 100644 --- a/vmlDrawing.go +++ b/vmlDrawing.go @@ -1,4 +1,4 @@ -// Copyright 2016 - 2018 The excelize Authors. All rights reserved. Use of +// Copyright 2016 - 2019 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/xmlChart.go b/xmlChart.go index 2f9b8d9..163812d 100644 --- a/xmlChart.go +++ b/xmlChart.go @@ -1,4 +1,4 @@ -// Copyright 2016 - 2018 The excelize Authors. All rights reserved. Use of +// Copyright 2016 - 2019 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/xmlComments.go b/xmlComments.go index 9075c88..5ffbecf 100644 --- a/xmlComments.go +++ b/xmlComments.go @@ -1,4 +1,4 @@ -// Copyright 2016 - 2018 The excelize Authors. All rights reserved. Use of +// Copyright 2016 - 2019 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/xmlContentTypes.go b/xmlContentTypes.go index 8d09d51..e99b0b3 100644 --- a/xmlContentTypes.go +++ b/xmlContentTypes.go @@ -1,4 +1,4 @@ -// Copyright 2016 - 2018 The excelize Authors. All rights reserved. Use of +// Copyright 2016 - 2019 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/xmlDecodeDrawing.go b/xmlDecodeDrawing.go index d21c3f0..eead575 100644 --- a/xmlDecodeDrawing.go +++ b/xmlDecodeDrawing.go @@ -1,4 +1,4 @@ -// Copyright 2016 - 2018 The excelize Authors. All rights reserved. Use of +// Copyright 2016 - 2019 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/xmlDrawing.go b/xmlDrawing.go index 7356cb5..89496c4 100644 --- a/xmlDrawing.go +++ b/xmlDrawing.go @@ -1,4 +1,4 @@ -// Copyright 2016 - 2018 The excelize Authors. All rights reserved. Use of +// Copyright 2016 - 2019 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/xmlSharedStrings.go b/xmlSharedStrings.go index 782ed61..3fcf3d5 100644 --- a/xmlSharedStrings.go +++ b/xmlSharedStrings.go @@ -1,4 +1,4 @@ -// Copyright 2016 - 2018 The excelize Authors. All rights reserved. Use of +// Copyright 2016 - 2019 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/xmlStyles.go b/xmlStyles.go index 7ba4379..fc53f77 100644 --- a/xmlStyles.go +++ b/xmlStyles.go @@ -1,4 +1,4 @@ -// Copyright 2016 - 2018 The excelize Authors. All rights reserved. Use of +// Copyright 2016 - 2019 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/xmlTable.go b/xmlTable.go index 7e155e6..6d27dc9 100644 --- a/xmlTable.go +++ b/xmlTable.go @@ -1,4 +1,4 @@ -// Copyright 2016 - 2018 The excelize Authors. All rights reserved. Use of +// Copyright 2016 - 2019 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/xmlTheme.go b/xmlTheme.go index b4140b6..01d0054 100644 --- a/xmlTheme.go +++ b/xmlTheme.go @@ -1,4 +1,4 @@ -// Copyright 2016 - 2018 The excelize Authors. All rights reserved. Use of +// Copyright 2016 - 2019 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/xmlWorkbook.go b/xmlWorkbook.go index 6572033..ad66f42 100644 --- a/xmlWorkbook.go +++ b/xmlWorkbook.go @@ -1,4 +1,4 @@ -// Copyright 2016 - 2018 The excelize Authors. All rights reserved. Use of +// Copyright 2016 - 2019 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/xmlWorksheet.go b/xmlWorksheet.go index d35b40e..b3e8877 100644 --- a/xmlWorksheet.go +++ b/xmlWorksheet.go @@ -1,4 +1,4 @@ -// Copyright 2016 - 2018 The excelize Authors. All rights reserved. Use of +// Copyright 2016 - 2019 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. // |