# QtOfficeOpenXml **Repository Path**: fanchengqing/QtOfficeOpenXml ## Basic Information - **Project Name**: QtOfficeOpenXml - **Description**: For Qt 5.2 or newer supported 来自:https://github.com/dbzhang800/QtOfficeOpenXml - **Primary Language**: Unknown - **License**: LGPL-3.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-02-29 - **Last Updated**: 2024-06-06 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## 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 * https://www.assembla.com/spaces/IS29500/wiki/Home * http://referencesource.microsoft.com/#WindowsBase/Base/System/IO/Packaging/Package.cs * http://msdn.microsoft.com/en-us/library/System.IO.Packaging%28v=vs.110%29.aspx * https://github.com/mono/mono * http://msdn.microsoft.com/en-us/library/cc313071.aspx * http://www.lyquidity.com/devblog/?p=35