Qt c++ xlsx get maxımum row for calculate average
-
I'm trying calculate average of some datas. Qxlsx bibrary says use
xlsx.write("B9", "=AVERAGE(B3:B5)", lAlign);
for calculate average but by end cell not known.
When I made chart I tried sth kile this and its worked.lineChart -> addSeries(CellRange("C7:C" + maxRow), xlsx.sheet("Sheet1"));
max Row is my maximum row number. How can I append my end row to average function? here is library.
Qxlsx examples folder -
@mangekoyu said in Qt c++ xlsx get maxımum row for calculate average:
xlsx.write("B9", "=AVERAGE(B3:B5)", lAlign);
Did you try something like:
xlsx.write("B9", QString("=AVERAGE(B3:B%1)").arg(maxRow), lAlign);
-
@DerReisende
I have no idea, I don't use or need QtXlsx. The OP might! Or he can plonk 9999 in there. -
@JonB said in Qt c++ xlsx get maxımum row for calculate average:
If you can't figure what your max row count is, your could just put 9999 in and that might do you :)
@JonB I tried '
QString averval = "=AVERAGE(B7:B" + maxRow + ")";
I can get this one when I debug it.
"=AVERAGE(B7:B413)"