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

create a copy of template presentation ".potx" to a new ".pptx" using openXML

I have a powerpoint template with .potx extension, i need to create a copy of the template file, but the created file does not have any content present in it, it is a blank presentation, below is the function i am using to create a destination file…
G--
  • 497
  • 1
  • 8
  • 25
4
votes
0 answers

Read using OleDbConnection created xlsx file using Open xml SDk

I created xlsx file using standarts of Open Xml SDK. While opening it in excel everything works perfect. My problem is that I cannot open that created file using OleDbConnection, but others not created xlsx file OleDB can open as well. Will be glad…
4
votes
0 answers

Parsing Ooxml using Open XML SDK

I'm using Javascript API for Office to get ooxml of parts of the document using Binding.getDataAsync. The result is that I have ooxml text which represent part of the document: Now what I want is to alter this XML for example to put a table around…
AHMED EL-HAROUNY
  • 836
  • 6
  • 17
4
votes
2 answers

Can I set auto-width on an Open XML SDK-generated spreadsheet without calculating the individual widths?

I'm working on creating an Excel file from a large set of data by using the Open XML SDK. I've finally managed to get a functional Columns node, which specifies all of the columns which will actually be used in the file. There is a "BestFit"…
Grace Note
  • 3,205
  • 4
  • 35
  • 55
4
votes
2 answers

OpenXml WorksheetParts.First() is not always the 1st sheet MS Excel shows

I have XLSX files which when viewed in Excel have multiple sheets. However, some of the files using the snippet below actually have the WorksheetPart.First as the 2nd or 3rd worksheet when viewed in excel. I think this is because the sheets were…
Matthew Mc
  • 43
  • 1
  • 3
4
votes
2 answers

How to create a Word document from a Silverlight 4 application?

I'm looking for some options to programmatically create a Word document from within a Silverlight 4 application. I found two approaches which seemed promising at first but don't look like they will work. OpenXML SDK The OpenXML SDK isn't available…
George Durzi
  • 1,632
  • 1
  • 19
  • 31
4
votes
1 answer

Programmatically generated PowerPoint presentations break PowerPoint 2013

I am trying to generated Presentations from different sources. Basically I have about 200 slides from a number of PowerPoint presentations. In order to accomplish this I'm using OpenXml Sdk. The flow of the program is as follows: open template…
malutan.mircea
  • 143
  • 1
  • 2
  • 12
4
votes
1 answer

Excel table validation / formula not being copied to new table row

I am currently using EPPlus library to export large amounts of data to several worksheets and tables in side each of those worksheets. I have been able to create list validation and have it working via a lookup worksheet named range perfectly fine.…
Patrick Magee
  • 2,951
  • 3
  • 33
  • 50
4
votes
1 answer

Unable to use existing paragraph styles in Open Xml

I'm working on an export of an HTML file to a Open XML wordfile. If in the HTML

is used, I want to add a Heading1 style to that part. But somehow when I open the document in Microsoft Word 2010, the Style isn't applied. If I open the created…

Vincent Hogendoorn
  • 700
  • 1
  • 7
  • 23
4
votes
1 answer

Insert a new worksheet into a spreadsheet document OpenXml

What im trying to do is create multiple worksheets within a work book using datasets the code i have to create a sheet data object from a data set is: public static SheetData CreateDataSheet(DataSet ds) { var xlSheetData = new…
Houlahan
  • 783
  • 3
  • 19
  • 46
4
votes
3 answers

ASP.NET MVC cannot stream files

I have a ASP.NET MVC 4 site that creates an excel file using OPEN XML SDK. I simply point the hyperlink to the proper controller and it generates the OPEN XML excel document and writes the stream to response header and done. In IE 9 and Chrome this…
4
votes
3 answers

Reading decimal value from an Excel cell (in C#)

When reading values from Excel cells that contain decimals, I am running into the following issue: If I enter 9.95 in the cell in Excel, CellValue.InnerText in C# returns "9.9499999999999993" How can I get the actual value that was entered, meaning…
Luis Ferrao
  • 1,463
  • 2
  • 15
  • 30
4
votes
1 answer

Coldfusion Accessing a .net objects parent methods

For some reason Coldfusion is having an issue with accessing the parent methods of one of the objects it creates. consider this code: variables.sHTML = '

Hello…

Jarede
  • 3,310
  • 4
  • 44
  • 68
4
votes
2 answers

Install Open XML 2.0

I'm trying to use spreadsheetlight to write to excel file, but apparently spreadsheetlight uses XML 2.0 and I have 2.5 installed. I've unistalled the 2.5 version and have added the 2.0 reference to my project, but I still get an error message…
user2950764
  • 211
  • 4
  • 13
4
votes
2 answers

What is Annotation in regards to Document Format Open Xml?

I search this and get only one following line on msdn website - http://msdn.microsoft.com/en-us/library/documentformat.openxml.inkml.annotation_members(v=office.14).aspx without any explanation:- Get the first annotation object of the specified type…
user3492844