diff --git a/excelize_test.go b/excelize_test.go index 79010b1..4169983 100644 --- a/excelize_test.go +++ b/excelize_test.go @@ -1003,7 +1003,11 @@ func TestSharedStrings(t *testing.T) { if !assert.NoError(t, err) { t.FailNow() } - f.GetRows("Sheet1") + rows, err := f.GetRows("Sheet1") + if !assert.NoError(t, err) { + t.FailNow() + } + assert.Equal(t, "A", rows[0][0]) } func TestSetSheetRow(t *testing.T) { diff --git a/rows.go b/rows.go index cb0e31f..220c233 100644 --- a/rows.go +++ b/rows.go @@ -112,8 +112,8 @@ func (f *File) Rows(sheet string) (*Rows, error) { return nil, ErrSheetNotExist{sheet} } if xlsx != nil { - output, _ := xml.Marshal(f.Sheet[name]) - f.saveFileList(name, replaceWorkSheetsRelationshipsNameSpaceBytes(output)) + data := f.readXML(name) + f.saveFileList(name, replaceWorkSheetsRelationshipsNameSpaceBytes(namespaceStrictToTransitional(data))) } return &Rows{ f: f,