summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRi Xu <xuri.me@gmail.com>2016-09-02 19:41:14 +0800
committerRi Xu <xuri.me@gmail.com>2016-09-02 19:41:14 +0800
commitdb47b6750d06ce8726e042454c9a2291a5466874 (patch)
treef793434466b214ecabde952eae866d4b482b5977
parent7bd8d9ee5b6952af85f555ac0d74910f87ea71f9 (diff)
Update readme and comments of the test file.
-rw-r--r--README.md6
-rw-r--r--excelize_test.go5
2 files changed, 7 insertions, 4 deletions
diff --git a/README.md b/README.md
index 3614490..7a4114c 100644
--- a/README.md
+++ b/README.md
@@ -39,7 +39,7 @@ func main() {
xlsx = excelize.NewSheet(xlsx, 3, "Sheet3")
xlsx = excelize.SetCellInt(xlsx, "Sheet2", "A23", 10)
xlsx = excelize.SetCellStr(xlsx, "Sheet3", "B20", "Hello")
- err := excelize.Save(xlsx, "~/Workbook.xlsx")
+ err := excelize.Save(xlsx, "/home/Workbook.xlsx")
if err != nil {
fmt.Println(err)
}
@@ -59,7 +59,7 @@ import (
)
func main() {
- xlsx, err := excelize.OpenFile("~/Workbook.xlsx")
+ xlsx, err := excelize.OpenFile("/home/Workbook.xlsx")
if err != nil {
fmt.Println(err)
}
@@ -87,7 +87,7 @@ import (
)
func main() {
- xlsx, err := excelize.OpenFile("~/Workbook.xlsx")
+ xlsx, err := excelize.OpenFile("/home/Workbook.xlsx")
if err != nil {
fmt.Println(err)
}
diff --git a/excelize_test.go b/excelize_test.go
index 456455e..3751775 100644
--- a/excelize_test.go
+++ b/excelize_test.go
@@ -51,10 +51,13 @@ func TestExcelize(t *testing.T) {
if err != nil {
t.Log(err)
}
+ // Test given illegal rows number
GetCellValue(file, "Sheet2", "a-1")
+ // Test given lowercase column number
GetCellValue(file, "Sheet2", "a5")
GetCellValue(file, "Sheet2", "C11")
GetCellValue(file, "Sheet2", "D11")
GetCellValue(file, "Sheet2", "D12")
- GetCellValue(file, "Sheet2", "E12")
+ // Test given axis large than exists row
+ GetCellValue(file, "Sheet2", "E13")
}