diff options
author | raochq <31030448+raochq@users.noreply.github.com> | 2021-08-15 01:19:49 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-15 01:19:49 +0800 |
commit | b02f864eab5edb2155601b9dd640f99fbd442cb3 (patch) | |
tree | c2fb09f4bc8885c12240deae30ee8004720694d1 /lib.go | |
parent | 48c16de8bf74df0fa94a30d29e2e7e3446d48433 (diff) |
This closes #844, support get shared formula
Diffstat (limited to 'lib.go')
-rw-r--r-- | lib.go | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -93,13 +93,12 @@ func readFile(file *zip.File) ([]byte, error) { // func SplitCellName(cell string) (string, int, error) { alpha := func(r rune) bool { - return ('A' <= r && r <= 'Z') || ('a' <= r && r <= 'z') + return ('A' <= r && r <= 'Z') || ('a' <= r && r <= 'z') || (r == 36) } - if strings.IndexFunc(cell, alpha) == 0 { i := strings.LastIndexFunc(cell, alpha) if i >= 0 && i < len(cell)-1 { - col, rowstr := cell[:i+1], cell[i+1:] + col, rowstr := strings.ReplaceAll(cell[:i+1], "$", ""), cell[i+1:] if row, err := strconv.Atoi(rowstr); err == nil && row > 0 { return col, row, nil } |