macExcel_test.go 565 B

123456789101112131415161718192021
  1. package xlsx
  2. import (
  3. . "gopkg.in/check.v1"
  4. )
  5. type MacExcelSuite struct{}
  6. var _ = Suite(&MacExcelSuite{})
  7. // Test that we can successfully read an XLSX file generated by
  8. // Microsoft Excel for Mac. In particular this requires that we
  9. // respect the contents of workbook.xml.rels, which maps the sheet IDs
  10. // to their internal file names.
  11. func (m *MacExcelSuite) TestMacExcel(c *C) {
  12. xlsxFile, err := OpenFile("macExcelTest.xlsx")
  13. c.Assert(err, IsNil)
  14. c.Assert(xlsxFile, NotNil)
  15. s := xlsxFile.Sheets[0].Cell(0, 0).String()
  16. c.Assert(s, Equals, "编号")
  17. }