QString fileName
= appData
+ DIR
+ "AISTABLE";
fileName = fileName + d_local.toString("_yyyy-MM-dd") + t_local.toString("_HH-mm-ss") + ".csv";
f_out = fopen(fileName.toAscii().data(), "wb+");
if (f_out == NULL) {
return;
}
QString headerString
= "d1,d2,d3,d4,d5,d6,d7,d8,d9,d10,d11\r\n";
for(int row = 0;row <ui->tableWidget->rowCount()-1; row++)
{
for(int column = 0;column< ui->tableWidget->columnCount()-1 ;column++)
{
headerString += ui->tableWidget->item(row,column)->text() +",";
}
headerString += "\r\n";
}
fprintf(f_out,"%s",headerString.toAscii().data());
fflush(f_out);
fclose(f_out);
QString fileName = appData + DIR+ "AISTABLE";
fileName = fileName + d_local.toString("_yyyy-MM-dd") + t_local.toString("_HH-mm-ss") + ".csv";
f_out = fopen(fileName.toAscii().data(), "wb+");
if (f_out == NULL) {
return;
}
QString headerString = "d1,d2,d3,d4,d5,d6,d7,d8,d9,d10,d11\r\n";
for(int row = 0;row <ui->tableWidget->rowCount()-1; row++)
{
for(int column = 0;column< ui->tableWidget->columnCount()-1 ;column++)
{
headerString += ui->tableWidget->item(row,column)->text() +",";
}
headerString += "\r\n";
}
fprintf(f_out,"%s",headerString.toAscii().data());
fflush(f_out);
fclose(f_out);
To copy to clipboard, switch view to plain text mode
Bookmarks