summaryrefslogtreecommitdiff
path: root/rows.go
diff options
context:
space:
mode:
authorxuri <xuri.me@gmail.com>2018-05-07 16:42:30 +0800
committerGitHub <noreply@github.com>2018-05-07 16:42:30 +0800
commitd04be7b33da84a3f2f768ee4f0de7c49ab69279e (patch)
treea4c441c4e2b7f3cdb3d34dcc80ae8e2011736b3b /rows.go
parent38ad20efc11c1872c4e62a12617f0300c138b867 (diff)
parent3ca180f09c4a602068d890bd22e83ac48a83f5cf (diff)
Merge branch 'master' into lunny/refactor
Diffstat (limited to 'rows.go')
-rw-r--r--rows.go9
1 files changed, 1 insertions, 8 deletions
diff --git a/rows.go b/rows.go
index ff1a8c3..d005183 100644
--- a/rows.go
+++ b/rows.go
@@ -108,11 +108,9 @@ func (rows *Rows) Columns() []string {
if rows.token == nil {
return []string{}
}
-
startElement := rows.token.(xml.StartElement)
r := xlsxRow{}
rows.decoder.DecodeElement(&r, &startElement)
-
d := rows.f.sharedStringsReader()
row := make([]string, len(r.C), len(r.C))
for _, colCell := range r.C {
@@ -135,7 +133,6 @@ func (err ErrSheetNotExist) Error() string {
// Rows return a rows iterator. For example:
//
// rows, err := xlsx.GetRows("Sheet1")
-//
// for rows.Next() {
// for _, colCell := range rows.Columns() {
// fmt.Print(colCell, "\t")
@@ -150,13 +147,9 @@ func (f *File) Rows(sheet string) (*Rows, error) {
return nil, ErrSheetNotExist{sheet}
}
if xlsx != nil {
- output, err := xml.Marshal(f.Sheet[name])
- if err != nil {
- return nil, err
- }
+ output, _ := xml.Marshal(f.Sheet[name])
f.saveFileList(name, replaceWorkSheetsRelationshipsNameSpaceBytes(output))
}
-
return &Rows{
f: f,
decoder: xml.NewDecoder(bytes.NewReader(f.readXML(name))),