[fixed] empty value is^W was returned if cell is string formula

This commit is contained in:
Ivan
2019-04-02 23:38:51 +03:00
parent 5480ee5058
commit 0bc58acfcb
3 changed files with 40 additions and 11 deletions

View File

@@ -3,10 +3,10 @@ package xls
import (
"bytes"
"encoding/binary"
"golang.org/x/text/encoding/charmap"
"io"
"os"
"unicode/utf16"
"golang.org/x/text/encoding/charmap"
)
//xls workbook type
@@ -162,9 +162,9 @@ func (wb *WorkBook) parseBof(buf io.ReadSeeker, b *bof, pre *bof, offset_pre int
return
}
func decodeWindows1251(enc []byte) string {
dec := charmap.Windows1251.NewDecoder()
out, _ := dec.Bytes(enc)
return string(out)
dec := charmap.Windows1251.NewDecoder()
out, _ := dec.Bytes(enc)
return string(out)
}
func (w *WorkBook) get_string(buf io.ReadSeeker, size uint16) (res string, err error) {
if w.Is5ver {