|
@@ -45,3 +45,34 @@ func (m *MacNumbersSuite) TestMacNumbers(c *C) {
|
|
|
s := sheet.Cell(0, 0).String()
|
|
s := sheet.Cell(0, 0).String()
|
|
|
c.Assert(s, Equals, "编号")
|
|
c.Assert(s, Equals, "编号")
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+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("./testdocs/wpsBlankLineTest.xlsx")
|
|
|
|
|
+ c.Assert(err, IsNil)
|
|
|
|
|
+ c.Assert(xlsxFile, NotNil)
|
|
|
|
|
+ sheet := xlsxFile.Sheet["Sheet1"]
|
|
|
|
|
+ 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)
|
|
|
|
|
+}
|