From 29b2854e53560beb3c238786929097421fa9a942 Mon Sep 17 00:00:00 2001 From: xuri Date: Tue, 23 Apr 2019 13:34:24 +0800 Subject: [PATCH] Update readme --- README.md | 6 +++++- README_zh.md | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 472ed604..eae00727 100644 --- a/README.md +++ b/README.md @@ -74,7 +74,11 @@ func main() { return } // Get value from cell by given worksheet name and axis. - cell := f.GetCellValue("Sheet1", "B2") + cell, err := f.GetCellValue("Sheet1", "B2") + if err != nil { + fmt.Println(err) + return + } fmt.Println(cell) // Get all the rows in the Sheet1. rows, err := f.GetRows("Sheet1") diff --git a/README_zh.md b/README_zh.md index addc9f2e..dfed749d 100644 --- a/README_zh.md +++ b/README_zh.md @@ -73,7 +73,11 @@ func main() { return } // 获取工作表中指定单元格的值 - cell := f.GetCellValue("Sheet1", "B2") + cell, err := f.GetCellValue("Sheet1", "B2") + if err != nil { + fmt.Println(err) + return + } fmt.Println(cell) // 获取 Sheet1 上所有单元格 rows, err := f.GetRows("Sheet1")