diff options
author | Ri Xu <xuri.me@gmail.com> | 2017-06-26 18:44:19 +0800 |
---|---|---|
committer | Ri Xu <xuri.me@gmail.com> | 2017-06-26 18:44:19 +0800 |
commit | 35841caaf18b20af9e7b942ca8cbb7441f310382 (patch) | |
tree | f3ce44b34c9ed63a7af60ecbf5f999274c212b38 /table.go | |
parent | db4aff04fdfdd0459f1dcf5b0540a820dd8ea34e (diff) |
- Function `formattedValue()` performance improvement by avoid repeating deserialization, relate issue #64;
- Make function `ToAlphaString()` exportable, relate issue #63
Diffstat (limited to 'table.go')
-rw-r--r-- | table.go | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -108,12 +108,12 @@ func (f *File) addTable(sheet, tableXML string, hxAxis, hyAxis, vxAxis, vyAxis, vyAxis++ } // Correct table reference coordinate area, such correct C1:B3 to B1:C3. - ref := toAlphaString(hxAxis+1) + strconv.Itoa(hyAxis+1) + ":" + toAlphaString(vxAxis+1) + strconv.Itoa(vyAxis+1) + ref := ToAlphaString(hxAxis+1) + strconv.Itoa(hyAxis+1) + ":" + ToAlphaString(vxAxis+1) + strconv.Itoa(vyAxis+1) tableColumn := []*xlsxTableColumn{} idx := 0 for i := hxAxis; i <= vxAxis; i++ { idx++ - cell := toAlphaString(i+1) + strconv.Itoa(hyAxis+1) + cell := ToAlphaString(i+1) + strconv.Itoa(hyAxis+1) name := f.GetCellValue(sheet, cell) if _, err := strconv.Atoi(name); err == nil { f.SetCellStr(sheet, cell, name) @@ -254,7 +254,7 @@ func (f *File) AutoFilter(sheet, hcell, vcell, format string) error { if vyAxis < hyAxis { vyAxis, hyAxis = hyAxis, vyAxis } - ref := toAlphaString(hxAxis+1) + strconv.Itoa(hyAxis+1) + ":" + toAlphaString(vxAxis+1) + strconv.Itoa(vyAxis+1) + ref := ToAlphaString(hxAxis+1) + strconv.Itoa(hyAxis+1) + ":" + ToAlphaString(vxAxis+1) + strconv.Itoa(vyAxis+1) refRange := vxAxis - hxAxis err := f.autoFilter(sheet, ref, refRange, hxAxis, formatSet) return err |