summaryrefslogtreecommitdiff
path: root/excelize.go
diff options
context:
space:
mode:
authorRi Xu <xuri.me@gmail.com>2016-09-05 10:44:32 +0800
committerRi Xu <xuri.me@gmail.com>2016-09-05 10:44:32 +0800
commit956a4627d1f2b78172eaaf6078209d4cf8e64ce2 (patch)
tree4a5fea7d2cfd8d0a8c46cfc2ae711f1c8f309bcf /excelize.go
parent9c3a24d5c369216ec5e1c292dd6547f7e263d23f (diff)
Fix issue #4 use builtin `map` instead of home-built.
Diffstat (limited to 'excelize.go')
-rw-r--r--excelize.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/excelize.go b/excelize.go
index 6da8639..2dd62d3 100644
--- a/excelize.go
+++ b/excelize.go
@@ -17,7 +17,7 @@ type FileList struct {
// OpenFile take the name of an XLSX file and returns a populated
// xlsx.File struct for it.
-func OpenFile(filename string) (file []FileList, err error) {
+func OpenFile(filename string) (file map[string]string, err error) {
var f *zip.ReadCloser
f, err = zip.OpenReader(filename)
if err != nil {
@@ -28,7 +28,7 @@ func OpenFile(filename string) (file []FileList, err error) {
}
// SetCellInt provide function to set int type value of a cell
-func SetCellInt(file []FileList, sheet string, axis string, value int) []FileList {
+func SetCellInt(file map[string]string, sheet string, axis string, value int) map[string]string {
axis = strings.ToUpper(axis)
var xlsx xlsxWorksheet
col := getColIndex(axis)
@@ -58,7 +58,7 @@ func SetCellInt(file []FileList, sheet string, axis string, value int) []FileLis
}
// SetCellStr provide function to set string type value of a cell
-func SetCellStr(file []FileList, sheet string, axis string, value string) []FileList {
+func SetCellStr(file map[string]string, sheet string, axis string, value string) map[string]string {
axis = strings.ToUpper(axis)
var xlsx xlsxWorksheet
col := getColIndex(axis)