Closed raphael10-collab closed 4 days ago
The relevant part of the error message is:
/usr/local/include/xlnt/cell/cell.hpp:115:7: note: template argument deduction/substitution failed:
/home/raphy/Grasp/src/main.cpp:3448:53: note: couldn’t deduce template parameter ‘T’
3448 | const double vd = cell.value();
| ~~~~~~~~~~^~
Template argument deduction doesn't work for return types. So you should explicitly specify the template parameter:
const double vd = cell.value<double>();
Yes. I forgot to specify the type in
Thank you
From here: https://xlnt-community.github.io/xlnt/classxlnt_1_1cell.html#a1e034f21e14e3eebe8d4059917537e13
Returns the value of this cell as an instance of type T. Overloads exist for most C++ fundamental types like bool, int, etc. as well as for std::string and xlnt datetime types: date, time, datetime, and timedelta.
I understand, but I can be wrong, that I should be able to get the value of the cell in this way:
But I get this error:
no matching function for call to ‘xlnt::cell::value()’
What am I missing or doing wrong? How to correctly get the value of the cell as a
double
?