diff options
author | xuri <xuri.me@gmail.com> | 2021-03-07 15:02:04 +0800 |
---|---|---|
committer | xuri <xuri.me@gmail.com> | 2021-03-07 15:02:04 +0800 |
commit | 7e12b560ce40fc756fa5347d25a64ea48f9710ac (patch) | |
tree | 747ab4400b798b96bfa3c0e8f063b0e463ce819a /stream_test.go | |
parent | 71bd5e19598db4dae85d983d1f79251451cb2d9a (diff) |
#625, support setting formula for cell in streaming API
Diffstat (limited to 'stream_test.go')
-rw-r--r-- | stream_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/stream_test.go b/stream_test.go index 7c6eb9b..c5febfc 100644 --- a/stream_test.go +++ b/stream_test.go @@ -55,8 +55,8 @@ func TestStreamWriter(t *testing.T) { // Test set cell with style. styleID, err := file.NewStyle(`{"font":{"color":"#777777"}}`) assert.NoError(t, err) - assert.NoError(t, streamWriter.SetRow("A4", []interface{}{Cell{StyleID: styleID}})) - assert.NoError(t, streamWriter.SetRow("A5", []interface{}{&Cell{StyleID: styleID, Value: "cell"}})) + assert.NoError(t, streamWriter.SetRow("A4", []interface{}{Cell{StyleID: styleID}, Cell{Formula: "SUM(A10,B10)"}})) + assert.NoError(t, streamWriter.SetRow("A5", []interface{}{&Cell{StyleID: styleID, Value: "cell"}, &Cell{Formula: "SUM(A10,B10)"}})) assert.EqualError(t, streamWriter.SetRow("A6", []interface{}{time.Now()}), "only UTC time expected") for rowID := 10; rowID <= 51200; rowID++ { |