Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xlsx.read(int row,int col) problem #14

Closed
liufeijin opened this issue Oct 15, 2018 · 2 comments
Closed

xlsx.read(int row,int col) problem #14

liufeijin opened this issue Oct 15, 2018 · 2 comments

Comments

@liufeijin
Copy link
Contributor

i want to get a cell value by using xlsx.read(3,13+j3).
But it return the formula in the cell not the value. like "=($P$1+$S$1)+$P$1/15
(15-CA2)")

How can i get cell value but not formula?

Best regards,
jeff

@liufeijin
Copy link
Contributor Author

Cell* cell = xlsx.cellAt(3,13+j*3); // get cell pointer. (row is 1. column is 2.)
if ( cell == NULL )
continue; // cell vaule is not set
QVariant var = cell->readValue(); // read cell value (number(double), QDateTime, QString ...)
// qDebug() << var; // display value

Also gets formula. :(

@liufeijin
Copy link
Contributor Author

OK . PLS close this , i got the way
xlsx.cellAt(3,13+j*3)->value().toInt();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants