ECMA-376 | Office Open XML File Formats |
namespace | class | dll |
DocumentFormat.OpenXml.Packaging | WordprocessingDocument | DocumentFormat.OpenXml.dll |
DocumentFormat.OpenXml.Packaging | MainDocumentPart | DocumentFormat.OpenXml.dll |
DocumentFormat.OpenXml.Packaging | ImagePart | DocumentFormat.OpenXml.dll |
DocumentFormat.OpenXml.Wordprocessing | Document | DocumentFormat.OpenXml.dll |
DocumentFormat.OpenXml.Wordprocessing | Body | DocumentFormat.OpenXml.dll |
DocumentFormat.OpenXml.Wordprocessing | Paragraph | DocumentFormat.OpenXml.dll |
DocumentFormat.OpenXml.Wordprocessing | Run | DocumentFormat.OpenXml.dll |
DocumentFormat.OpenXml.Wordprocessing | Text | DocumentFormat.OpenXml.dll |
DocumentFormat.OpenXml.Wordprocessing | RunProperties | DocumentFormat.OpenXml.dll |
DocumentFormat.OpenXml.Wordprocessing | RunFonts | DocumentFormat.OpenXml.dll |
DocumentFormat.OpenXml | OpenXmlElementList | DocumentFormat.OpenXml.dll |
DocumentFormat.OpenXml | OpenXmlElement | DocumentFormat.OpenXml.dll |
DocumentFormat.OpenXml | OpenXmlLeafElement | DocumentFormat.OpenXml.dll |
DocumentFormat.OpenXml | OpenXmlContext | DocumentFormat.OpenXml.dll |
DocumentFormat.OpenXml.Drawing.Wordprocessing | Extent | DocumentFormat.OpenXml.dll |
DocumentFormat.OpenXml.Drawing.Wordprocessing | EffectExtent | DocumentFormat.OpenXml.dll |
DocumentFormat.OpenXml.Drawing.Wordprocessing | DocProperties | DocumentFormat.OpenXml.dll |
DocumentFormat.OpenXml.Drawing | GraphicFrameLocks | DocumentFormat.OpenXml.dll |
DocumentFormat.OpenXml.Drawing.Pictures | NonVisualDrawingProperties | DocumentFormat.OpenXml.dll |
CS | C++ |
REFERENCES+= /r:"C:\Program Files\Open XML SDK\V2.0\lib\DocumentFormat.OpenXml.dll" | |
REFERENCES+= /r:"c:\Program Files\Reference Assemblies\Microsoft\Framework\v3.0\WindowsBase.dll" |
unzip: if [ ! -e DOCX ] ; then mkdir DOCX ; fi cd DOCX; unzip ../test.docx sdktool: /cygdrive/c/Program\ Files/Open\ XML\ SDK/V2.0/tool/OpenXmlSdkTool.exe &
#using <mscorlib.dll> #using <System.dll> #using <DocumentFormat.OpenXml.dll> #using <WindowsBase.dll> // for ZIP files - System.IO.Packaging.Package class using namespace System; //using namespace DocumentFormat::OpenXml; //using namespace DocumentFormat::OpenXml::Packaging; //using namespace DocumentFormat::OpenXml::Wordprocessing;; //using System.IO.Packaging; int main(array<System::String ^> ^args){ DocumentFormat::OpenXml::Packaging::WordprocessingDocument^ package = DocumentFormat::OpenXml::Packaging::WordprocessingDocument::Create( "test.docx", DocumentFormat::OpenXml::WordprocessingDocumentType::Document); DocumentFormat::OpenXml::Packaging::MainDocumentPart^ mainDocumentPart1 = package->AddMainDocumentPart(); mainDocumentPart1->Document = gcnew DocumentFormat::OpenXml::Wordprocessing::Document(); DocumentFormat::OpenXml::Wordprocessing::Text^ textFirstLine = gcnew DocumentFormat::OpenXml::Wordprocessing::Text("Hello World"); DocumentFormat::OpenXml::Wordprocessing::Run^ run = gcnew DocumentFormat::OpenXml::Wordprocessing::Run(); run->AppendChild<DocumentFormat::OpenXml::Wordprocessing::Text^>(textFirstLine); DocumentFormat::OpenXml::Wordprocessing::Paragraph^ para = gcnew DocumentFormat::OpenXml::Wordprocessing::Paragraph(); para->AppendChild<DocumentFormat::OpenXml::Wordprocessing::Run^>(run); DocumentFormat::OpenXml::Wordprocessing::Body^ body = gcnew DocumentFormat::OpenXml::Wordprocessing::Body(); body->AppendChild<DocumentFormat::OpenXml::Wordprocessing::Paragraph^>(para); mainDocumentPart1->Document->AppendChild<DocumentFormat::OpenXml::Wordprocessing::Body^>(body); mainDocumentPart1->Document->Save(); package->Close(); return EXIT_SUCCESS; }
.PHONY: all test .SUFFIXES: .exe .obj TARGET=hello all: $(TARGET).exe clear_screen: clear CLRIMAGETYPE=pure LOPT=-clrimagetype:$(CLRIMAGETYPE) COPT=-c -Wall -Od -clr:$(CLRIMAGETYPE) OBJS=$(TARGET).obj $(TARGET).obj: $(TARGET).cpp $(TARGET).exe: $(OBJS) link $(OBJS) /out:$@ $(LOPT) AI_PATH=/AI"c:\Program Files\Reference Assemblies\Microsoft\Framework\v3.0" AI_PATH+= /AI"C:\Program Files\Open XML SDK\V2.0\lib" .cpp.obj: cl $(COPT) $< $(AI_PATH) @echo test: test.docx cygstart $< test.docx: $(TARGET).exe if [ -e $@ ]; then rm $@ ; fi ./$(TARGET).exe unzip: if [ ! -e DOCX ] ; then mkdir DOCX ; fi cd DOCX; unzip ../test.docx sdktool: /cygdrive/c/Program\ Files/Open\ XML\ SDK/V2.0/tool/OpenXmlSdkTool.exe &
(some cast) element->CloneNode(true);