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
1 answer

Open XML table cell font, width

How can I do to insert the table (see code below) in a specific position of a word file (the location is the text of a paragraph). Then you can set the font and width of the table cells? Dim table As New Table() Dim tblBorders As New…
invictus1306
  • 587
  • 1
  • 4
  • 19
0
votes
1 answer

How to insert formating of text in Content Control via OpenXML

I am getting some data and from it I am generating a custom XML file. I have a Microsoft Office Word document with Rich Text Content Controls in it. I bind the data to the Content Controls with this method: private void…
Gesh
  • 323
  • 3
  • 18
0
votes
0 answers

Add Cell Metadata in Excel using OpenXml

I have a scenario, where I want to add meta data to individual cells in Excel(.xslx) file. While going through Cell class in Open XML, I found that there are provision to store metadata for cell. Refer :…
0
votes
2 answers

MS Office - How bind some parts of document to custom XML data and then replace this data via .NET?

I need to generate .docx/.xlsx files in .NET from some kind of templates (for generating contracts, invoices, etc.)... I've found some information about custom XML parts in OpenXML format and binding data from this parts to document, so i can bind…
Anton
  • 575
  • 2
  • 7
  • 27
0
votes
1 answer

How to align paragraph verticaly and horizontaly like MS word using Openxml?

I would like to align paragraph that i am passing as table to word document using open xml as vertically and horizonaly like as MS word does. how can i do this?
user1584245
0
votes
2 answers

Export Images in excel using OpenXml SDK?

I am facing a problem while exporting multiple images in Excel Cell. I am doing it in a simple button click in a page . using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using…
Rahul Chowdhury
  • 1,138
  • 6
  • 29
  • 52
0
votes
1 answer

Create a word template and replace content control text with code using Open XML

I'm trying to create a word template with place holders (content controls), I then want to replace the text within these place holders using Open XML but I can't do it. So within word I've entered Design Mode and added a Rich Text Box content…
Sun
  • 4,458
  • 14
  • 66
  • 108
0
votes
1 answer

Problems trying to open a word document for editing in Windows store application

I'm tyring to use Microsoft Open XML SDK 2.0 within a Windows 8 store application to edit an existing MS word document. So, I create a blank windows store application. I then use NuGet to install DocumentFormat.OpenXml. This seems to work OK but…
Sun
  • 4,458
  • 14
  • 66
  • 108
0
votes
2 answers

Emending PDF files into OpenXML WordprocessingML

I am strugling with Open XML SDK and embedding pdf files into a docx file. I do not want to use automation I am able to create *.bin files from everything except from *.pdf (see this question) Anyone has experience with this? From what I've…
aerkain
  • 592
  • 1
  • 4
  • 16
0
votes
1 answer

How to prevent new lines appearing after inserting Paragraphs with OpenXML?

I'm trying to insert text into Bookmarks in an OpenXML .docx file, but it's inserting a new line after each Paragraph. How can I prevent this? e.g.: I add the text to the document by finding the Bookmarks with the following: var bmk=…
DaveDev
  • 41,155
  • 72
  • 223
  • 385
0
votes
0 answers

Scene3D does not exist in the namespace 'DocumentFormat.OpenXml.Drawing'

I am using Open XML SDK 2.0 Productivity Tool to reflect the code of an empty PowerPoint 2010 presentation. I copied the generated code to a .cs file in a project which has a reference to DocumentFormat.OpenXml.dll (v2.0.5022.0). When I compile the…
Yván Ecarri
  • 1,661
  • 18
  • 39
0
votes
1 answer

How to Create/Open Excel files using OpenXml with C#

I have a console application in which we are creating xlsx files using OPENXML, we are able to create xlsx file & save it into specific folder in application. But Now we want to show that file as a Save/Open dialog pop up. Then we can able to…
SuryaKavitha
  • 493
  • 5
  • 16
  • 36
0
votes
2 answers

Open word in Report Viewer

Im using a ASP.Net 4. I want to be able to display a word document in the microsoft report viewer . This document is uploaded by the user and needs to be displayed in the report viewer ? How do i go about this ?
0
votes
0 answers

How to open a Existing xlsx file as a Pop up for SAVE/OPEN in C#

I have a ASP.net application in which we are creating xlsx files using OPENXML, we are able to create xlsx file & save it into one of the folder in application. But Now we want to show that file as a SAVE/Open dialog pop up. (As shown in IMAGE…
Constant Learner
  • 525
  • 4
  • 13
  • 30
0
votes
1 answer

Office Open XML: Drawing Dashed Line in Chart

Using office open XML SDK I have drawn a scatter chart with smooth line but wondering how to change the line style for the series to show dashed line?
Zabed Akbar
  • 537
  • 1
  • 8
  • 20