Closed hongnod closed 7 years ago
one more question: for the test.xlsx file(debug & release), if I modified the B2 cell content to "99", then save it , the value_type lost.(win10 ,office 2013 64 bit)
Thanks for all the contributions @topillar. I'll get to work on these soon.
more info, following code will crash, I guess there bug relates to data_type(), or I have made something wrong.
xlnt::workbook wb1; wb1.load("test.xlsx"); qDebug()<<"wbload"; auto sht = wb1.active_sheet(); qDebug()<< "activesheet"; auto cl = sht.cell(2,2); auto typ = cl.data_type(); if(typ == xlnt::cell_type::string) { QMessageBox::about(NULL, "ok", "the cell A1 is string");
}else
{
QMessageBox::about(NULL, "ok", "the cell A1 is not string");
}
if (has_type && (type == "inlineStr" || type == "str"))
{
cell.value(value_string);
}
else if (has_type && type == "s" && !has_formula)
{
auto shared_string_index = static_cast
For the header issue, I'm assuming you were seeing that warning when unzipping test.xlsx using 7-zip? If so, that problem has been fixed. I'm afraid I couldn't reproduce the second problem you reported. I did clean up the corresponding code so maybe it will be fixed for you. Could you try it again and close this issue if it's working?
Closing for now. Please comment here if you're still seeing a problem with the headers and otherwise open a new issue if you find any other problems.
Thanks for your fixes. I tested with the result of : Issue 1 is fixed as desired Issue 2 is still there. flowing is the changing of the "sheet1.xml"
before:
`
`
after: `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
using following code to create a sample xlsx file, if this code compiled in debug model, the output xlsx file reports header error when it is in the process of unzipping.