Qt Office Open Xml is a library that can be used to read and write opc packages, such as .xlsx/.docx/.pptx files. It doesn't require Microsoft Office and can be used in any platform that Qt 5.2 or newer supported.
Status | Namespace | .... |
---|---|---|
[Done] | QtOfficeOpenXml::Opc |
is designed for general OPC package reading and writing. |
[Wip ] | QtOfficeOpenXml::Sml |
is designed for Spreadsheet documents reading and writing. |
[Todo] | QtOfficeOpenXml::Wml |
is designed for Wordprocessing documents reading and writing. |
[Todo] | QtOfficeOpenXml::Pml |
is designed for Presention documents reading and writing. |
[Wip ] | QtOfficeOpenXml::Dml |
provides Drawing support for Sml, Wml and Pml. |
[Wip ] | QtOfficeOpenXml::Ooxml |
is used by Dml, Sml, Wml and Pml. |
[Done] | QtOfficeOpenXml::Mce |
provides Markup Compatibility and Extensibility supports for all the library. |
Note: Perl is needed in this step.
-
Download the source code.
-
Put the source code in any directory you like
-
Run following command at the toplevel directory of the project
qmake
make
make install
The library, the header files, and others will be installed to your system.
- Add following line to your qmake's project file:
QT += officeopenxml
- Then, using Qt Office Open XML in your code
Maybe useful for users and contributors.
Globals files requried by all over the library.
Depends on global
only.
MCE (Markup Compatibility and Extensibility)
More information for mce can be found in ISO/IEC 29500:3.
key features of MCE?
- Alternative Content Blocks [Done]
- Ignorable and "must understand" namespaces [Done]
- ProcessContents [Done]
- Application-defined extension elements [Todo, wait for next version of ISO/IEC 29500?]
- Namespace subsumption [Won't support, seems they will be dropped by next ISO/IEC 29500?]
- ...
Depends on global
and mce
.
OPC (Open Packaging Conventions)
More information for opc can be found in ISO/IEC 29500:2.
As .xlsx, .pptx, .docx are all examples of opc package, user can do many interesting things using opc:
- Create a simple .xlsx, .pptx or .docx document from scratch. See example
opc_create_package
- View the internal raw files of opc package. See example
opc_package_viewer
andopc_extract_package
- Find the deference of two opc packages. See example
opc_packages_diff
- Create an Book1.xlsx file with Excel.
- Do something for Book1.xlsx in Excel, then save it as Book2.xlsx
- Open Book1.xlsx and Book2.xlsx using
opc_packages_diff
to find what happened. - Edit an existing opc package directly. See example
opc_package_xml_edit
- Open an Test.xlsx file generated by Excel
- Edit the internal xml file of Test.xlsx directly, then save it again.
- Re-open the Test.xlsx in Excel to find out what happened.
Depends on global
, mce
and opc
.
Shared files for Office Open XML Parts: dml
, wml
,sml
and pml
.
More information can be found in ISO/IEC 29500:1 and ISO/IEC 29500:4.
Depends on global
, mce
, opc
and ooxml
.
DML (DrawingML)
Depends on global
, mce
, opc
, ooxml
and dml
.
SML (SpreadsheetML)
Depends on global
, mce
, opc
, ooxml
and dml
.
WML (WordprocessingML)
Depends on global
, mce
, opc
, ooxml
and dml
.
PML (PresentionML)