change go module import path to github.com/xuri/excelize
This commit is contained in:
parent
f9e9e5d2e0
commit
e9ae9b45b2
|
@ -0,0 +1,6 @@
|
|||
patreon: xuri
|
||||
open_collective: excelize
|
||||
ko_fi: xurime
|
||||
liberapay: xuri
|
||||
issuehunt: xuri
|
||||
custom: https://www.paypal.com/paypalme/xuri
|
|
@ -31,7 +31,7 @@ A great way to contribute to the project is to send a detailed report when you
|
|||
encounter an issue. We always appreciate a well-written, thorough bug report,
|
||||
and will thank you for it!
|
||||
|
||||
Check that [our issue database](https://github.com/360EntSecGroup-Skylar/excelize/issues)
|
||||
Check that [our issue database](https://github.com/xuri/excelize/issues)
|
||||
doesn't already include that problem or suggestion before submitting an issue.
|
||||
If you find a match, you can use the "subscribe" button to get notified on
|
||||
updates. Do *not* leave random "+1" or "I have this too" comments, as they
|
||||
|
@ -55,7 +55,7 @@ This section gives the experienced contributor some tips and guidelines.
|
|||
|
||||
Not sure if that typo is worth a pull request? Found a bug and know how to fix
|
||||
it? Do it! We will appreciate it. Any significant improvement should be
|
||||
documented as [a GitHub issue](https://github.com/360EntSecGroup-Skylar/excelize/issues) before
|
||||
documented as [a GitHub issue](https://github.com/xuri/excelize/issues) before
|
||||
anybody starts working on it.
|
||||
|
||||
We are always thrilled to receive pull requests. We do our best to process them
|
||||
|
|
22
README.md
22
README.md
|
@ -1,10 +1,10 @@
|
|||
<p align="center"><img width="650" src="./excelize.svg" alt="Excelize logo"></p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/360EntSecGroup-Skylar/excelize/actions/workflows/go.yml"><img src="https://github.com/360EntSecGroup-Skylar/excelize/actions/workflows/go.yml/badge.svg" 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://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://pkg.go.dev/github.com/360EntSecGroup-Skylar/excelize/v2?tab=doc"><img src="https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white" alt="go.dev"></a>
|
||||
<a href="https://github.com/xuri/excelize/actions/workflows/go.yml"><img src="https://github.com/xuri/excelize/actions/workflows/go.yml/badge.svg" alt="Build Status"></a>
|
||||
<a href="https://codecov.io/gh/qax-os/excelize"><img src="https://codecov.io/gh/qax-os/excelize/branch/master/graph/badge.svg" alt="Code Coverage"></a>
|
||||
<a href="https://goreportcard.com/report/github.com/xuri/excelize"><img src="https://goreportcard.com/badge/github.com/xuri/excelize" alt="Go Report Card"></a>
|
||||
<a href="https://pkg.go.dev/github.com/xuri/excelize/v2?tab=doc"><img src="https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white" alt="go.dev"></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.com/paypalme/xuri"><img src="https://img.shields.io/badge/Donate-PayPal-green.svg" alt="Donate"></a>
|
||||
</p>
|
||||
|
@ -13,20 +13,20 @@
|
|||
|
||||
## 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 / XLTX files. Supports reading and writing spreadsheet documents generated by Microsoft Excel™ 2007 and later. Supports complex components by high compatibility, and provided streaming API for generating or reading data from a worksheet with huge amounts of data. This library needs Go version 1.15 or later. The full API docs can be seen using go's built-in documentation tool, or online at [go.dev](https://pkg.go.dev/github.com/360EntSecGroup-Skylar/excelize/v2?tab=doc) and [docs reference](https://xuri.me/excelize/).
|
||||
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 / XLTX files. Supports reading and writing spreadsheet documents generated by Microsoft Excel™ 2007 and later. Supports complex components by high compatibility, and provided streaming API for generating or reading data from a worksheet with huge amounts of data. This library needs Go version 1.15 or later. The full API docs can be seen using go's built-in documentation tool, or online at [go.dev](https://pkg.go.dev/github.com/xuri/excelize/v2?tab=doc) and [docs reference](https://xuri.me/excelize/).
|
||||
|
||||
## Basic Usage
|
||||
|
||||
### Installation
|
||||
|
||||
```bash
|
||||
go get github.com/360EntSecGroup-Skylar/excelize
|
||||
go get github.com/xuri/excelize
|
||||
```
|
||||
|
||||
- If your packages are managed using [Go Modules](https://blog.golang.org/using-go-modules), please install with following command.
|
||||
|
||||
```bash
|
||||
go get github.com/360EntSecGroup-Skylar/excelize/v2
|
||||
go get github.com/xuri/excelize/v2
|
||||
```
|
||||
|
||||
### Create spreadsheet
|
||||
|
@ -39,7 +39,7 @@ package main
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/360EntSecGroup-Skylar/excelize/v2"
|
||||
"github.com/xuri/excelize/v2"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
@ -68,7 +68,7 @@ package main
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/360EntSecGroup-Skylar/excelize/v2"
|
||||
"github.com/xuri/excelize/v2"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
@ -111,7 +111,7 @@ package main
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/360EntSecGroup-Skylar/excelize/v2"
|
||||
"github.com/xuri/excelize/v2"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
@ -171,7 +171,7 @@ import (
|
|||
_ "image/jpeg"
|
||||
_ "image/png"
|
||||
|
||||
"github.com/360EntSecGroup-Skylar/excelize/v2"
|
||||
"github.com/xuri/excelize/v2"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
22
README_zh.md
22
README_zh.md
|
@ -1,10 +1,10 @@
|
|||
<p align="center"><img width="650" src="./excelize.svg" alt="Excelize logo"></p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/360EntSecGroup-Skylar/excelize/actions/workflows/go.yml"><img src="https://github.com/360EntSecGroup-Skylar/excelize/actions/workflows/go.yml/badge.svg" 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://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://pkg.go.dev/github.com/360EntSecGroup-Skylar/excelize/v2?tab=doc"><img src="https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white" alt="go.dev"></a>
|
||||
<a href="https://github.com/xuri/excelize/actions/workflows/go.yml"><img src="https://github.com/xuri/excelize/actions/workflows/go.yml/badge.svg" alt="Build Status"></a>
|
||||
<a href="https://codecov.io/gh/qax-os/excelize"><img src="https://codecov.io/gh/qax-os/excelize/branch/master/graph/badge.svg" alt="Code Coverage"></a>
|
||||
<a href="https://goreportcard.com/report/github.com/xuri/excelize"><img src="https://goreportcard.com/badge/github.com/xuri/excelize" alt="Go Report Card"></a>
|
||||
<a href="https://pkg.go.dev/github.com/xuri/excelize/v2?tab=doc"><img src="https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white" alt="go.dev"></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.com/paypalme/xuri"><img src="https://img.shields.io/badge/Donate-PayPal-green.svg" alt="Donate"></a>
|
||||
</p>
|
||||
|
@ -13,20 +13,20 @@
|
|||
|
||||
## 简介
|
||||
|
||||
Excelize 是 Go 语言编写的用于操作 Office Excel 文档基础库,基于 ECMA-376,ISO/IEC 29500 国际标准。可以使用它来读取、写入由 Microsoft Excel™ 2007 及以上版本创建的电子表格文档。支持 XLSX / XLSM / XLTM / XLTX 等多种文档格式,高度兼容带有样式、图片(表)、透视表、切片器等复杂组件的文档,并提供流式读写 API,用于处理包含大规模数据的工作簿。可应用于各类报表平台、云计算、边缘计算等系统。使用本类库要求使用的 Go 语言为 1.15 或更高版本,完整的 API 使用文档请访问 [go.dev](https://pkg.go.dev/github.com/360EntSecGroup-Skylar/excelize/v2?tab=doc) 或查看 [参考文档](https://xuri.me/excelize/)。
|
||||
Excelize 是 Go 语言编写的用于操作 Office Excel 文档基础库,基于 ECMA-376,ISO/IEC 29500 国际标准。可以使用它来读取、写入由 Microsoft Excel™ 2007 及以上版本创建的电子表格文档。支持 XLSX / XLSM / XLTM / XLTX 等多种文档格式,高度兼容带有样式、图片(表)、透视表、切片器等复杂组件的文档,并提供流式读写 API,用于处理包含大规模数据的工作簿。可应用于各类报表平台、云计算、边缘计算等系统。使用本类库要求使用的 Go 语言为 1.15 或更高版本,完整的 API 使用文档请访问 [go.dev](https://pkg.go.dev/github.com/xuri/excelize/v2?tab=doc) 或查看 [参考文档](https://xuri.me/excelize/)。
|
||||
|
||||
## 快速上手
|
||||
|
||||
### 安装
|
||||
|
||||
```bash
|
||||
go get github.com/360EntSecGroup-Skylar/excelize
|
||||
go get github.com/xuri/excelize
|
||||
```
|
||||
|
||||
- 如果您使用 [Go Modules](https://blog.golang.org/using-go-modules) 管理软件包,请使用下面的命令来安装最新版本。
|
||||
|
||||
```bash
|
||||
go get github.com/360EntSecGroup-Skylar/excelize/v2
|
||||
go get github.com/xuri/excelize/v2
|
||||
```
|
||||
|
||||
### 创建 Excel 文档
|
||||
|
@ -39,7 +39,7 @@ package main
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/360EntSecGroup-Skylar/excelize/v2"
|
||||
"github.com/xuri/excelize/v2"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
@ -68,7 +68,7 @@ package main
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/360EntSecGroup-Skylar/excelize/v2"
|
||||
"github.com/xuri/excelize/v2"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
@ -111,7 +111,7 @@ package main
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/360EntSecGroup-Skylar/excelize/v2"
|
||||
"github.com/xuri/excelize/v2"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
@ -171,7 +171,7 @@ import (
|
|||
_ "image/jpeg"
|
||||
_ "image/png"
|
||||
|
||||
"github.com/360EntSecGroup-Skylar/excelize/v2"
|
||||
"github.com/xuri/excelize/v2"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
4
cell.go
4
cell.go
|
@ -468,7 +468,7 @@ type HyperlinkOpts struct {
|
|||
// in this workbook. Maximum limit hyperlinks in a worksheet is 65530. The
|
||||
// below is example for external link.
|
||||
//
|
||||
// err := f.SetCellHyperLink("Sheet1", "A3", "https://github.com/360EntSecGroup-Skylar/excelize", "External")
|
||||
// err := f.SetCellHyperLink("Sheet1", "A3", "https://github.com/xuri/excelize", "External")
|
||||
// // Set underline and font color style for the cell.
|
||||
// style, err := f.NewStyle(`{"font":{"color":"#1265BE","underline":"single"}}`)
|
||||
// err = f.SetCellStyle("Sheet1", "A3", "A3", style)
|
||||
|
@ -594,7 +594,7 @@ func (f *File) GetCellRichText(sheet, cell string) (runs []RichTextRun, err erro
|
|||
// import (
|
||||
// "fmt"
|
||||
//
|
||||
// "github.com/360EntSecGroup-Skylar/excelize/v2"
|
||||
// "github.com/xuri/excelize/v2"
|
||||
// )
|
||||
//
|
||||
// func main() {
|
||||
|
|
|
@ -41,7 +41,7 @@ func TestConcurrency(t *testing.T) {
|
|||
assert.NoError(t, f.SetCellStyle("Sheet1", "A3", "A3", style))
|
||||
// Concurrency add picture
|
||||
assert.NoError(t, f.AddPicture("Sheet1", "F21", filepath.Join("test", "images", "excel.jpg"),
|
||||
`{"x_offset": 10, "y_offset": 10, "hyperlink": "https://github.com/360EntSecGroup-Skylar/excelize", "hyperlink_type": "External", "positioning": "oneCell"}`))
|
||||
`{"x_offset": 10, "y_offset": 10, "hyperlink": "https://github.com/xuri/excelize", "hyperlink_type": "External", "positioning": "oneCell"}`))
|
||||
// Concurrency get cell picture
|
||||
name, raw, err := f.GetPicture("Sheet1", "A1")
|
||||
assert.Equal(t, "", name)
|
||||
|
|
4
chart.go
4
chart.go
|
@ -510,7 +510,7 @@ func parseFormatChartSet(formatSet string) (*formatChart, error) {
|
|||
// import (
|
||||
// "fmt"
|
||||
//
|
||||
// "github.com/360EntSecGroup-Skylar/excelize/v2"
|
||||
// "github.com/xuri/excelize/v2"
|
||||
// )
|
||||
//
|
||||
// func main() {
|
||||
|
@ -783,7 +783,7 @@ func parseFormatChartSet(formatSet string) (*formatChart, error) {
|
|||
// import (
|
||||
// "fmt"
|
||||
//
|
||||
// "github.com/360EntSecGroup-Skylar/excelize/v2"
|
||||
// "github.com/xuri/excelize/v2"
|
||||
// )
|
||||
//
|
||||
// func main() {
|
||||
|
|
|
@ -338,7 +338,7 @@ func TestInsertCol(t *testing.T) {
|
|||
|
||||
fillCells(f, sheet1, 10, 10)
|
||||
|
||||
assert.NoError(t, f.SetCellHyperLink(sheet1, "A5", "https://github.com/360EntSecGroup-Skylar/excelize", "External"))
|
||||
assert.NoError(t, f.SetCellHyperLink(sheet1, "A5", "https://github.com/xuri/excelize", "External"))
|
||||
assert.NoError(t, f.MergeCell(sheet1, "A1", "C3"))
|
||||
|
||||
assert.NoError(t, f.AutoFilter(sheet1, "A2", "B2", `{"column":"B","expression":"x != blanks"}`))
|
||||
|
@ -356,7 +356,7 @@ func TestRemoveCol(t *testing.T) {
|
|||
|
||||
fillCells(f, sheet1, 10, 15)
|
||||
|
||||
assert.NoError(t, f.SetCellHyperLink(sheet1, "A5", "https://github.com/360EntSecGroup-Skylar/excelize", "External"))
|
||||
assert.NoError(t, f.SetCellHyperLink(sheet1, "A5", "https://github.com/xuri/excelize", "External"))
|
||||
assert.NoError(t, f.SetCellHyperLink(sheet1, "C5", "https://github.com", "External"))
|
||||
|
||||
assert.NoError(t, f.MergeCell(sheet1, "A1", "B1"))
|
||||
|
|
|
@ -322,9 +322,9 @@ func TestSetCellHyperLink(t *testing.T) {
|
|||
t.Log(err)
|
||||
}
|
||||
// Test set cell hyperlink in a work sheet already have hyperlinks.
|
||||
assert.NoError(t, f.SetCellHyperLink("Sheet1", "B19", "https://github.com/360EntSecGroup-Skylar/excelize", "External"))
|
||||
assert.NoError(t, f.SetCellHyperLink("Sheet1", "B19", "https://github.com/xuri/excelize", "External"))
|
||||
// Test add first hyperlink in a work sheet.
|
||||
assert.NoError(t, f.SetCellHyperLink("Sheet2", "C1", "https://github.com/360EntSecGroup-Skylar/excelize", "External"))
|
||||
assert.NoError(t, f.SetCellHyperLink("Sheet2", "C1", "https://github.com/xuri/excelize", "External"))
|
||||
// Test add Location hyperlink in a work sheet.
|
||||
assert.NoError(t, f.SetCellHyperLink("Sheet2", "D6", "Sheet1!D8", "Location"))
|
||||
// Test add Location hyperlink with display & tooltip in a work sheet.
|
||||
|
@ -347,7 +347,7 @@ func TestSetCellHyperLink(t *testing.T) {
|
|||
ws, ok := f.Sheet.Load("xl/worksheets/sheet1.xml")
|
||||
assert.True(t, ok)
|
||||
ws.(*xlsxWorksheet).Hyperlinks = &xlsxHyperlinks{Hyperlink: make([]xlsxHyperlink, 65530)}
|
||||
assert.EqualError(t, f.SetCellHyperLink("Sheet1", "A65531", "https://github.com/360EntSecGroup-Skylar/excelize", "External"), ErrTotalSheetHyperlinks.Error())
|
||||
assert.EqualError(t, f.SetCellHyperLink("Sheet1", "A65531", "https://github.com/xuri/excelize", "External"), ErrTotalSheetHyperlinks.Error())
|
||||
|
||||
f = NewFile()
|
||||
_, err = f.workSheetReader("Sheet1")
|
||||
|
@ -355,7 +355,7 @@ func TestSetCellHyperLink(t *testing.T) {
|
|||
ws, ok = f.Sheet.Load("xl/worksheets/sheet1.xml")
|
||||
assert.True(t, ok)
|
||||
ws.(*xlsxWorksheet).MergeCells = &xlsxMergeCells{Cells: []*xlsxMergeCell{{Ref: "A:A"}}}
|
||||
err = f.SetCellHyperLink("Sheet1", "A1", "https://github.com/360EntSecGroup-Skylar/excelize", "External")
|
||||
err = f.SetCellHyperLink("Sheet1", "A1", "https://github.com/xuri/excelize", "External")
|
||||
assert.EqualError(t, err, `cannot convert cell "A" to coordinates: invalid cell name "A"`)
|
||||
}
|
||||
|
||||
|
@ -1272,7 +1272,7 @@ func prepareTestBook1() (*File, error) {
|
|||
|
||||
// Test add picture to worksheet with offset, external hyperlink and positioning.
|
||||
err = f.AddPicture("Sheet1", "F21", filepath.Join("test", "images", "excel.png"),
|
||||
`{"x_offset": 10, "y_offset": 10, "hyperlink": "https://github.com/360EntSecGroup-Skylar/excelize", "hyperlink_type": "External", "positioning": "oneCell"}`)
|
||||
`{"x_offset": 10, "y_offset": 10, "hyperlink": "https://github.com/xuri/excelize", "hyperlink_type": "External", "positioning": "oneCell"}`)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
2
go.mod
2
go.mod
|
@ -1,4 +1,4 @@
|
|||
module github.com/360EntSecGroup-Skylar/excelize/v2
|
||||
module github.com/xuri/excelize/v2
|
||||
|
||||
go 1.15
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ func TestMergeCell(t *testing.T) {
|
|||
assert.NoError(t, f.SetCellValue("Sheet1", "G11", "set value in merged cell"))
|
||||
assert.NoError(t, f.SetCellInt("Sheet1", "H11", 100))
|
||||
assert.NoError(t, f.SetCellValue("Sheet1", "I11", float64(0.5)))
|
||||
assert.NoError(t, f.SetCellHyperLink("Sheet1", "J11", "https://github.com/360EntSecGroup-Skylar/excelize", "External"))
|
||||
assert.NoError(t, f.SetCellHyperLink("Sheet1", "J11", "https://github.com/xuri/excelize", "External"))
|
||||
assert.NoError(t, f.SetCellFormula("Sheet1", "G12", "SUM(Sheet1!B19,Sheet1!C19)"))
|
||||
value, err := f.GetCellValue("Sheet1", "H11")
|
||||
assert.Equal(t, "0.5", value)
|
||||
|
|
|
@ -54,7 +54,7 @@ func parseFormatPictureSet(formatSet string) (*formatPicture, error) {
|
|||
// _ "image/jpeg"
|
||||
// _ "image/png"
|
||||
//
|
||||
// "github.com/360EntSecGroup-Skylar/excelize/v2"
|
||||
// "github.com/xuri/excelize/v2"
|
||||
// )
|
||||
//
|
||||
// func main() {
|
||||
|
@ -68,7 +68,7 @@ func parseFormatPictureSet(formatSet string) (*formatPicture, error) {
|
|||
// fmt.Println(err)
|
||||
// }
|
||||
// // Insert a picture offset in the cell with external hyperlink, printing and positioning support.
|
||||
// if err := f.AddPicture("Sheet1", "H2", "image.gif", `{"x_offset": 15, "y_offset": 10, "hyperlink": "https://github.com/360EntSecGroup-Skylar/excelize", "hyperlink_type": "External", "print_obj": true, "lock_aspect_ratio": false, "locked": false, "positioning": "oneCell"}`); err != nil {
|
||||
// if err := f.AddPicture("Sheet1", "H2", "image.gif", `{"x_offset": 15, "y_offset": 10, "hyperlink": "https://github.com/xuri/excelize", "hyperlink_type": "External", "print_obj": true, "lock_aspect_ratio": false, "locked": false, "positioning": "oneCell"}`); err != nil {
|
||||
// fmt.Println(err)
|
||||
// }
|
||||
// if err := f.SaveAs("Book1.xlsx"); err != nil {
|
||||
|
@ -110,7 +110,7 @@ func (f *File) AddPicture(sheet, cell, picture, format string) error {
|
|||
// _ "image/jpeg"
|
||||
// "io/ioutil"
|
||||
//
|
||||
// "github.com/360EntSecGroup-Skylar/excelize/v2"
|
||||
// "github.com/xuri/excelize/v2"
|
||||
// )
|
||||
//
|
||||
// func main() {
|
||||
|
|
|
@ -42,7 +42,7 @@ func TestAddPicture(t *testing.T) {
|
|||
`{"x_offset": 140, "y_offset": 120, "hyperlink": "#Sheet2!D8", "hyperlink_type": "Location"}`))
|
||||
// Test add picture to worksheet with offset, external hyperlink and positioning.
|
||||
assert.NoError(t, f.AddPicture("Sheet1", "F21", filepath.Join("test", "images", "excel.jpg"),
|
||||
`{"x_offset": 10, "y_offset": 10, "hyperlink": "https://github.com/360EntSecGroup-Skylar/excelize", "hyperlink_type": "External", "positioning": "oneCell"}`))
|
||||
`{"x_offset": 10, "y_offset": 10, "hyperlink": "https://github.com/xuri/excelize", "hyperlink_type": "External", "positioning": "oneCell"}`))
|
||||
|
||||
file, err := ioutil.ReadFile(filepath.Join("test", "images", "excel.png"))
|
||||
assert.NoError(t, err)
|
||||
|
|
|
@ -82,7 +82,7 @@ type PivotTableField struct {
|
|||
// "fmt"
|
||||
// "math/rand"
|
||||
//
|
||||
// "github.com/360EntSecGroup-Skylar/excelize/v2"
|
||||
// "github.com/xuri/excelize/v2"
|
||||
// )
|
||||
//
|
||||
// func main() {
|
||||
|
|
|
@ -232,7 +232,7 @@ func TestRemoveRow(t *testing.T) {
|
|||
)
|
||||
fillCells(f, sheet1, colCount, rowCount)
|
||||
|
||||
assert.NoError(t, f.SetCellHyperLink(sheet1, "A5", "https://github.com/360EntSecGroup-Skylar/excelize", "External"))
|
||||
assert.NoError(t, f.SetCellHyperLink(sheet1, "A5", "https://github.com/xuri/excelize", "External"))
|
||||
|
||||
assert.EqualError(t, f.RemoveRow(sheet1, -1), "invalid row number -1")
|
||||
|
||||
|
@ -293,7 +293,7 @@ func TestInsertRow(t *testing.T) {
|
|||
)
|
||||
fillCells(f, sheet1, colCount, rowCount)
|
||||
|
||||
assert.NoError(t, f.SetCellHyperLink(sheet1, "A5", "https://github.com/360EntSecGroup-Skylar/excelize", "External"))
|
||||
assert.NoError(t, f.SetCellHyperLink(sheet1, "A5", "https://github.com/xuri/excelize", "External"))
|
||||
|
||||
assert.EqualError(t, f.InsertRow(sheet1, -1), "invalid row number -1")
|
||||
|
||||
|
|
Loading…
Reference in New Issue