Questions tagged [openxml-sdk]

The Open XML SDK for Microsoft Office is built on top of the System.IO.Packaging API and provides strongly typed part classes to manipulate Open XML documents.

Open XML is an open ECMA 376 standard and is also approved as the ISO/IEC 29500 standard that defines a set of XML schemas for representing spreadsheets, charts, presentations, and word processing documents. Microsoft Office Word 2007, Excel 2007, and PowerPoint 2007 and later versions all use Open XML as the default file format.

The Open XML file formats are useful for developers because they use an open standard and are based on well-known technologies: ZIP and XML.

The Open XML SDK for Microsoft Office is built on top of the System.IO.Packaging API and provides strongly typed part classes to manipulate Open XML documents. (Use version 2.5 whenever possible as it fixes some problems in version 2.0.) The SDK also uses the .NET Framework Language-Integrated Query (LINQ) technology to provide strongly typed object access to the XML content inside the parts of Open XML documents.

The Open XML SDK simplifies the task of manipulating Open XML packages and the underlying Open XML schema elements within a package. The Open XML Application Programming Interface (API) encapsulates many common tasks that developers perform on Open XML packages, so you can perform complex operations with just a few lines of code.

Above is taken from the Overview section here.

In 2015 the Open XML SDK was made open source, public on GitHub. Version 2.6.0 was released which fixes a bug in the way it works with System.IO.Packaging. It is otherwise the same as 2.5. More details are available here.

1516 questions
0
votes
3 answers

I need a wrapper (or alternative) for Open Office XML Presentations / Powerpoints

I recently automated the creation of Powerpoint Presentations in a site I'm making. I found the Office Interop libraries extremely simple to use. Office isn't built for this kind of thing in a webserver environment, so I'm looking at creating the…
Owen
  • 4,229
  • 5
  • 42
  • 50
0
votes
1 answer

how to convert a DocumentFormat.OpenXml.Presentation.shape into a HTML SVG element

I need a sample code for converting DocumentFormat.OpenXml.Presentation.shape into a HTML SVG element in .net. Please help me for this. Thanks in advance. RagesH.
0
votes
2 answers

Open XML SDK - Insert Picture in a Sharepoint Document

I have that problem using the open xml sdk 2.0 in a Sharepoint solution. My objective is add a image using the net url of the image for the a template document of my user inserted in a list, a attachments in the end of the document to be exact but…
0
votes
1 answer

OpenXml with Different level childnodes SQL

1.I have XML data like below, Child3 may or may not have Child4.If Child4 is there, another column should get added.
user3083626
  • 123
  • 1
  • 2
  • 6
0
votes
2 answers

How to modify a DocX file and save to a different location with OpenXML SDK?

I want to use OpenXML SDK 2.0 to do the following: Open A.docx Modify the document Save the modified document as B.docx A & B would be parameters to a method and they could be the same. Assuming they are not the same, A should not be modified at…
Mr. Boy
  • 60,845
  • 93
  • 320
  • 589
0
votes
2 answers

OpenXMLSDk: Insert Images Corrupted the document

I need to insert images in different pages. All the images will be different and it will be inserted in to different location like table cells. I have tried the example in the MSDN link…
swaroop
  • 11
  • 3
0
votes
1 answer

Insert wordMl at current selection(VSTO Word)

i am inserting a wordMl on my current selection range here is the wordMl i want to insert
0
votes
1 answer

How to remove tracked formatted changes

I have been following the msdn-guide to remove tracked changes from a docx document: MSDN However it doesnt remove tracked formatted changes thats been made to the document. Does anyone know how this can be done?
Pantani
  • 1,223
  • 1
  • 18
  • 25
0
votes
2 answers

Richtextbox and Docx converting

I'm making an editor for Word documents in C#. And I'm using a RichTextBox to create text with its formatting, and add a slice of XDocumento docx. Someone could tell me if you have any way of converting?? include formating... This example would…
0
votes
1 answer

Reading a .DOCX file from disk, editting it and then attaching to email on the fly using .NET

I have a requirement to read an existing MS Word 2007 file (.docx), replace string1 with string2 and then attached the "newly editted" file as an attachment on an email "on the fly". We are using v2.0 of Microsoft DocumentFormat.OpenXml SDK and .NET…
Kyle
  • 951
  • 3
  • 14
  • 31
0
votes
1 answer

Word Doc. getting corrupted by open XML find & replace

I am using following function in C# to find & replace in word doc using open xml sdk. // To search and replace content in a document part. public static void SearchAndReplace(string document) { using (WordprocessingDocument wordDoc =…
mribot
  • 519
  • 1
  • 11
  • 29
0
votes
0 answers

XML Import on EXCEL using OpenXML

I am trying to convert the following code to OPEN-XML C#. Scenario - Template has been created by the user using the XML mapping provided by Ecxel. The following code opens the template and imports the XML data file (dataPath) and saves it as final…
user2943193
  • 41
  • 1
  • 12
0
votes
1 answer

How to add an hyperlink to a shape in a presentation using OpenXml SDK

I am developing with C# application to create a PowerPoint presentation. I am using the OpenXML SDK 2.0 and MS Office PP 2007. I am able to clone my slides from my template and add a new shape on it. But now i want to add a Hyperlink to my…
Leviathan
  • 282
  • 2
  • 12
0
votes
1 answer

How to change this method to return a string array

I want an array or list that contains all the values of all the cells in a spreadsheet. There are a set number of columns but any number of rows. This is a method I got from msdn.com and I want to know if I could modify it to return all values in…
will
  • 837
  • 3
  • 11
  • 24
0
votes
1 answer

How do i find(or calculate) the Height of the Header in the Word document (OPEN XML)?

Is there a way i can find the height of header for each page in a word document . Currently there seems to be no way which lets us find the header height ? Is there any other way i can go about this ? I tried with the pageMargin but nothing in that…
user581157
  • 1,327
  • 4
  • 26
  • 64