From e07581e980444b64bc15fce328ff07736ac9dbf6 Mon Sep 17 00:00:00 2001 From: Harris Date: Tue, 6 Aug 2019 16:43:56 -0500 Subject: Further improve read performance Instead of re-encoding the full sheet to change the namespaces in the encoded bytes, read the sheet again and do the byte replacements there. In this case, file access ends up being more performant than marshaling the sheet back to XML. In the SharedStrings test, ensure the strings are actually read. Fix #439 --- excelize_test.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'excelize_test.go') 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) { -- cgit v1.2.1