From 544ef18a8cb9949fcb8833c6d2816783c90f3318 Mon Sep 17 00:00:00 2001 From: xuri Date: Mon, 5 Jul 2021 00:03:56 +0800 Subject: - Support concurrency iterate rows and columns - Rename exported field `File.XLSX` to `File.Pkg` - Exported error message --- sheetpr_test.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'sheetpr_test.go') diff --git a/sheetpr_test.go b/sheetpr_test.go index 42e2e0d..53532e9 100644 --- a/sheetpr_test.go +++ b/sheetpr_test.go @@ -443,7 +443,9 @@ func TestSheetFormatPrOptions(t *testing.T) { func TestSetSheetFormatPr(t *testing.T) { f := NewFile() assert.NoError(t, f.GetSheetFormatPr("Sheet1")) - f.Sheet["xl/worksheets/sheet1.xml"].SheetFormatPr = nil + ws, ok := f.Sheet.Load("xl/worksheets/sheet1.xml") + assert.True(t, ok) + ws.(*xlsxWorksheet).SheetFormatPr = nil assert.NoError(t, f.SetSheetFormatPr("Sheet1", BaseColWidth(1.0))) // Test set formatting properties on not exists worksheet. assert.EqualError(t, f.SetSheetFormatPr("SheetN"), "sheet SheetN is not exist") @@ -452,7 +454,9 @@ func TestSetSheetFormatPr(t *testing.T) { func TestGetSheetFormatPr(t *testing.T) { f := NewFile() assert.NoError(t, f.GetSheetFormatPr("Sheet1")) - f.Sheet["xl/worksheets/sheet1.xml"].SheetFormatPr = nil + ws, ok := f.Sheet.Load("xl/worksheets/sheet1.xml") + assert.True(t, ok) + ws.(*xlsxWorksheet).SheetFormatPr = nil var ( baseColWidth BaseColWidth defaultColWidth DefaultColWidth -- cgit v1.2.1