package xlsx import ( . "gopkg.in/check.v1" ) type WpsBlankLineSuite struct {} var _ = Suite(&WorksheetSuite{}) // Test that we can successfully read an XLSX file generated by // Wps on windows. you can download it freely from http://www.wps.cn/ func (w *WpsBlankLineSuite) TestWpsBlankLine(c *C) { xlsxFile, err := OpenFile("wpsBlankLineTest.xlsx") c.Assert(err, IsNil) c.Assert(xlsxFile, NotNil) sheet := xlsxFile.Sheets[0] row := sheet.Rows[0] cell := row.Cells[0] s := cell.String() expected := "编号" c.Assert(s, Equals, expected) row = sheet.Rows[2] cell = row.Cells[0] s = cell.String() c.Assert(s, Equals, expected) row = sheet.Rows[4] cell = row.Cells[1] s = cell.String() c.Assert(s, Equals, "") s = sheet.Rows[4].Cells[2].String() c.Assert(s, Equals, expected) }