I am trying to write a data in csv file as below
l<<"StatusFrame1"<<"PORstat"<<"name";
{
out<<l.at(0).toStdString().c_str()<<","<<l.at(1).toStdString().c_str()<<"\n";
out<<l.at(0).toStdString().c_str()<<","<<l.at(1).toStdString().c_str()<<"\n";
}
file.close();
QStringList l;
QFile file("Book.csv");
QTextStream out(&file);
l<<"StatusFrame1"<<"PORstat"<<"name";
if(file.open(QIODevice::WriteOnly))
{
out<<l.at(0).toStdString().c_str()<<","<<l.at(1).toStdString().c_str()<<"\n";
out<<l.at(0).toStdString().c_str()<<","<<l.at(1).toStdString().c_str()<<"\n";
}
file.close();
To copy to clipboard, switch view to plain text mode
The above code create a csv file(with one sheet) and successfully write the data on that sheet
But I want one more new sheet to be created or added in same csv file(like how we have number of sheets in one excel file)
So please let me know how can I create two or more sheets in one csv file.
Bookmarks