summaryrefslogtreecommitdiff
path: root/col.go
diff options
context:
space:
mode:
authorRi Xu <xuri.me@gmail.com>2017-06-27 17:53:06 +0800
committerRi Xu <xuri.me@gmail.com>2017-06-27 17:53:06 +0800
commit555e2ba9a82d6974077681c7ab34ce0fa93d351d (patch)
tree6d1d5ba963d1f2fc1cebebd61833e6b135ae8cc8 /col.go
parent35841caaf18b20af9e7b942ca8cbb7441f310382 (diff)
- 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
Diffstat (limited to 'col.go')
-rw-r--r--col.go8
1 files changed, 4 insertions, 4 deletions
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
}