For Qt5.2 or newer, ...
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
examples
src
tests
.gitignore
.qmake.conf
LICENSE.GPLv2
LICENSE.LGPLv3
README.md
qtofficeopenxml.pro
sync.profile

README.md

Introduction

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.

Getting Started

Building the module

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.

Using the module

  • Add following line to your qmake's project file:
    QT += officeopenxml
  • Then, using Qt Office Open XML in your code

Source code directories

Maybe useful for users and contributors.

global\

Globals files requried by all over the library.

mce\

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?]
  • ...

opc\

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 and opc_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.

ooxml\

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.

dml\

Depends on global, mce, opc and ooxml.

DML (DrawingML)

sml\

Depends on global, mce, opc, ooxml and dml.

SML (SpreadsheetML)

wml\

Depends on global, mce, opc, ooxml and dml.

WML (WordprocessingML)

pml\

Depends on global, mce, opc, ooxml and dml.

PML (PresentionML)

References

General