You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
587 B
31 lines
587 B
11 years ago
|
#include <QtCore>
|
||
|
#include "xlsxdocument.h"
|
||
|
|
||
|
int main()
|
||
|
{
|
||
|
{
|
||
|
//Create a new .xlsx file.
|
||
|
QXlsx::Document xlsx;
|
||
|
xlsx.write("A1", "Hello Qt!");
|
||
|
xlsx.write("A2", 12345);
|
||
|
xlsx.write("A3", "=44+33");
|
||
|
xlsx.write("A4", true);
|
||
|
xlsx.write("A5", "http://qt-project.org");
|
||
|
xlsx.saveAs("Book1.xlsx");
|
||
|
}
|
||
|
|
||
|
//![0]
|
||
|
QXlsx::Document xlsx("Book1.xlsx");
|
||
|
//![0]
|
||
|
|
||
|
//![1]
|
||
|
qDebug()<<xlsx.read("A1");
|
||
|
qDebug()<<xlsx.read("A2");
|
||
|
qDebug()<<xlsx.read("A3");
|
||
|
qDebug()<<xlsx.read("A4");
|
||
|
qDebug()<<xlsx.read("A5");
|
||
|
//![1]
|
||
|
|
||
|
return 0;
|
||
|
}
|