Writing into CSV file.
-
Hey Everyone,
Im trying to get some data from signal analyzer and append it into a csv file but the data which is getting updated in csv file is coming as
4.63E-204
and similar numbers like that , i want integers to be printed in the columns
below is the code snippet :QFile file("./file.csv");
file.open(QIODevice::WriteOnly | QIODevice::Text);
QTextStream out(&file);
out<<"Frequnecy , Measure Peak Frequency , Measured Tx Power, Measured Spurious Power , Measured Spurious Frequency\n";
*
*
Return_value.append(",");
Return_value.append(PK_VALUE);
*
*
out<<Return_value<<"\n";Thanks Looking forward for a suggestion.
-
Hey Everyone,
Im trying to get some data from signal analyzer and append it into a csv file but the data which is getting updated in csv file is coming as
4.63E-204
and similar numbers like that , i want integers to be printed in the columns
below is the code snippet :QFile file("./file.csv");
file.open(QIODevice::WriteOnly | QIODevice::Text);
QTextStream out(&file);
out<<"Frequnecy , Measure Peak Frequency , Measured Tx Power, Measured Spurious Power , Measured Spurious Frequency\n";
*
*
Return_value.append(",");
Return_value.append(PK_VALUE);
*
*
out<<Return_value<<"\n";Thanks Looking forward for a suggestion.
@Pariposh
And are the values which you are writing indeed (valid) integers? Because4.63E-204is equal to4.63 / (10^204), i.e. a very small number with 2040s after the decimal point!! And not an integer anyway. Show aqDebug()of which value is producing that output.