-
-
Notifications
You must be signed in to change notification settings - Fork 422
Expand file tree
/
Copy pathdocumentproperty.cpp
More file actions
25 lines (20 loc) · 810 Bytes
/
documentproperty.cpp
File metadata and controls
25 lines (20 loc) · 810 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// documentproperty.cpp
#include "xlsxdocument.h"
#include <QDebug>
#include <QtCore>
#include <QtGlobal>
int documentproperty()
{
QXlsx::Document xlsx;
xlsx.write("A1", "View the properties through:");
xlsx.write("A2", "Office Button -> Prepare -> Properties option in Excel");
xlsx.setDocumentProperty("title", "This is an example spreadsheet");
xlsx.setDocumentProperty("subject", "With document properties");
xlsx.setDocumentProperty("creator", "Debao Zhang");
xlsx.setDocumentProperty("company", "HMICN");
xlsx.setDocumentProperty("category", "Example spreadsheets");
xlsx.setDocumentProperty("keywords", "Sample, Example, Properties");
xlsx.setDocumentProperty("description", "Created with Qt Xlsx");
xlsx.saveAs("documentproperty.xlsx");
return 0;
}