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
5 answers

Adding an image to excel using openxml sdk

I'm trying to add an image to an excel document that has been generated by closedxml using openxml after the spreadsheet has been generated (since closedxml has no way to insert images currently). I can generate the excel file correctly and it opens…
Daniel Powell
  • 8,143
  • 11
  • 61
  • 108
0
votes
1 answer

Looking for code to update a textbox on a SpreadsheetML doc (client using VB.Net but I can read and convert C#)

I have a 2010 Excel Spreadsheet (OpenXML) with a textbox "LengthVariableTextBox" on it. I wish to change the textbox value (currently @@.@ just as a placeholder) using the openxml SDK with VB.Net (perfered) or C#. Below is a XML fragment from…
0
votes
1 answer

Unable to fill Content Control in Word using OpenXML

i am new to OpenXML and i am about to pull my hair on this issue. Help would really appreciated. Overview is that i am trying to fill the word document content template thru asp.net. I was easily able to populate the fields using CustomXML, BUT THE…
0
votes
1 answer

How to insert images directly in openXML document.xml

I need to call local images in openXML and convert XML to Word with those images using XSLT, I would like to insert the images directly instead of calling in document_rels file. I used the below tag to call the image 'blue_hills.jpg in C' drive …
VSe
  • 919
  • 2
  • 13
  • 29
0
votes
1 answer

Adding spacing and blank lines to Open Office XML

I am trying to output a word file using Open Office XML, but can't seem to get spacing correct. Variable name:ATTEND Description:Student's attendance status during the I want the word file to be this (with spaces after the :): Variable name:…
cdub
  • 24,555
  • 57
  • 174
  • 303
0
votes
1 answer

Get Paragraph with complete formatting

Using C# & OpenXML, I need to create a document. The document have series of paragraphs created under docs body. I need to make few paragraphs ready-only. To accomplish this the entire document made read-only. Edit permission to few paragraphs are…
Aishu
  • 413
  • 1
  • 5
  • 20
0
votes
0 answers

Integrate excel with asp.net web application using open XML

I want to use excel application on the web like google docs from asp.net web application using open XML.How can I do it?
Phoenix Kyaw
  • 332
  • 1
  • 5
  • 17
0
votes
1 answer

How to set the date in a word document manipulated using OpenXML?

I'm manipulating a word document using OpenXML and i have afield in that document to set the date. But the thing is when i insert the date like 01/10/2012, it get printed in the document as monday, October 10, 2012. That's not what i want. I want it…
aroshlakshan
  • 117
  • 2
  • 3
  • 16
0
votes
1 answer

Retrieve cell value issue with open xml sdk

Im having the following issue related with an excel 2007 file called "Libro1.xlsx". On this file i already set to "hello world" the cell A1 in the first sheet with id "rId1" and cell A2 to "500". In the following code you'll see that im accesing…
Jose3d
  • 9,149
  • 6
  • 33
  • 54
0
votes
1 answer

Open XML 2.0 c# parsing excel file but some rows are not being retrieved

I've read a lot of where people have missing cell data due to null values but my issue is I have spreadsheets I'm parsing that have exactly 272 rows of data needing to be parsed. When I get the row count I'm only able to retrieve 269. Below is how…
maguy
  • 1,599
  • 1
  • 15
  • 26
0
votes
2 answers

OpenXML converting .docx to .doc

I've successfully implemented OpenXML that takes the bookmarks within a document and replaces them. Unfortunately it only works with .docx and from what I understand .doc is not compatible with the OpenXML format. So, what I'm wondering is if I can…
Mitchell
  • 253
  • 1
  • 5
  • 16
0
votes
1 answer

OpenXML wordprocessing iterating by pages

How can I do loop by pages? I need to set some element to top and bottom for all pages without using header, footer and watermark. I use code bellow, but it doesn't work for all documents. public void AddLabel() { IEnumerable topP =…
Alexey
  • 11
  • 2
0
votes
0 answers

How to Copy the Images from one Excel Work book to another using Open XML SDK with C#?

We are developing C#(4.0) windows form application and we are using open xml sdk for accessing excel file. Now I want to copy all the images in one excel work to another Excel work book using this open xml sdk. I can able to create new excel work…
Saravanan
  • 11,372
  • 43
  • 143
  • 213
0
votes
1 answer

Add a footer to an existing OpenXML spreadsheet

EDIT: There's a further detail I left out with my original post. The program is using a template stream rather than a concrete template for the ".Open" command. The template stream gets initialized with this code block: public void Initialize(Stream…
ewomack
  • 753
  • 13
  • 29
0
votes
1 answer

Selecting and editing cells in Excel with OpenXML SDK

I'm basically inserting information from a dataset into an excel document. We really don't want to use interop services, so my best option is to use the OpenXML SDK. Basically all I need to do is select a cell based on an id/name/whatever (I would…
cDecker32
  • 813
  • 1
  • 10
  • 20
1 2 3
99
100