From 555e2ba9a82d6974077681c7ab34ce0fa93d351d Mon Sep 17 00:00:00 2001 From: Ri Xu Date: Tue, 27 Jun 2017 17:53:06 +0800 Subject: - Make function `TitleToNumber()` exportable, note that function `ToAlphaString()` return value calculation changes, get more info from go doc. Relate issue #63; - Readme and go doc updated --- col.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'col.go') diff --git a/col.go b/col.go index 66e28b8..2081e40 100644 --- a/col.go +++ b/col.go @@ -21,7 +21,7 @@ const ( // func (f *File) GetColVisible(sheet, column string) bool { xlsx := f.workSheetReader(sheet) - col := titleToNumber(strings.ToUpper(column)) + 1 + col := TitleToNumber(strings.ToUpper(column)) + 1 visible := true if xlsx.Cols == nil { return visible @@ -41,7 +41,7 @@ func (f *File) GetColVisible(sheet, column string) bool { // func (f *File) SetColVisible(sheet, column string, visible bool) { xlsx := f.workSheetReader(sheet) - c := titleToNumber(strings.ToUpper(column)) + 1 + c := TitleToNumber(strings.ToUpper(column)) + 1 col := xlsxCol{ Min: c, Max: c, @@ -78,8 +78,8 @@ func (f *File) SetColVisible(sheet, column string, visible bool) { // } // func (f *File) SetColWidth(sheet, startcol, endcol string, width float64) { - min := titleToNumber(strings.ToUpper(startcol)) + 1 - max := titleToNumber(strings.ToUpper(endcol)) + 1 + min := TitleToNumber(strings.ToUpper(startcol)) + 1 + max := TitleToNumber(strings.ToUpper(endcol)) + 1 if min > max { min, max = max, min } -- cgit v1.2.1