QXlsx
QXlsx copied to clipboard
Read data in excel2016 and receive accuracy loss with QString type. Test data 0.0524 accuracy loss when reading
When reading data in excel, I read the value of 0.0524. No matter what format is set in excel, the data obtained is 5.2400000000000002E-2. the code is : QXlsx::Document xlsx("book1.xlsx"); xlsx.selectSheet("test"); qDebug()<<xlsx.read(1,3);
read读过来是一个QVarient,使用to_double() 方法即可转换为double数据
@ lululuhaha This is a problem with excel, when you open the file for example with 7-zip, you can see in the main xml-sheet, that excel is saving the numbers in maximum 64-bit precision, and sometimes exponential, I don't know why.