Merge pull request #40 from adam-nielsen/master

Add test for charset error when opening valid .xlsx
This commit is contained in:
Thomas Fussell 2016-04-22 06:23:26 -04:00
commit f7c23b48da
2 changed files with 14 additions and 0 deletions

View File

@ -156,6 +156,20 @@ public:
TS_ASSERT_EQUALS(code, expected); TS_ASSERT_EQUALS(code, expected);
} }
void test_read_charset_excel()
{
auto path = PathHelper::GetDataDirectory("/reader/charset-excel.xlsx");
xlnt::workbook wb;
xlnt::excel_serializer serializer(wb);
serializer.load_workbook(path);
auto ws = wb["Sheet1"];
auto val = ws.get_cell("A1").get_value<std::string>();
TS_ASSERT_EQUALS(val, "Direnç");
}
xlnt::workbook date_mac_1904() xlnt::workbook date_mac_1904()
{ {
auto path = PathHelper::GetDataDirectory("/reader/date_1904.xlsx"); auto path = PathHelper::GetDataDirectory("/reader/date_1904.xlsx");

Binary file not shown.