Questions tagged [openxml]

Questions regarding reading and writing of Microsoft Office Open XML files either through direct manipulation of the XML files contained in a zip package or through the Microsoft Office Open XML SDK.

Office Open XML File Formats Official Standard

http://www.ecma-international.org/publications/standards/Ecma-376.htm

Microsoft Office Open XML SDK 2.0

http://www.microsoft.com/downloads/en/details.aspx?FamilyId=C6E744E5-36E9-45F5-8D8C-331DF206E0D0&displaylang=en

3743 questions
9
votes
1 answer

Using open XML to create excel file

I am trying to use Open XML to create a file but when trying to add just the first row of headers the file is being corrupted and I am unable to open, can anyone tell me what I am doing wrong here? using (SpreadsheetDocument spreadsheetDocument =…
Jay
  • 3,012
  • 14
  • 48
  • 99
9
votes
1 answer

Excel add data to WorksheetPart in code behind

Hello guys I am creating an Excel file with 3 worksheets in the following code. using (SpreadsheetDocument spreadSheet = SpreadsheetDocument.Create(path + @"\UrlReport.xlsx", SpreadsheetDocumentType.Workbook)) { // create…
theDawckta
  • 874
  • 3
  • 11
  • 25
9
votes
5 answers

How to access OpenXML content by page number?

Using OpenXML, can I read the document content by page number? wordDocument.MainDocumentPart.Document.Body gives content of full document. public void OpenWordprocessingDocumentReadonly() { string filepath =…
HaBo
  • 13,999
  • 36
  • 114
  • 206
9
votes
1 answer

How to insert text into a content control with the Open XML SDK

I'm trying to develop a solution which takes the input from a ASP.Net Web Page and Embed the input values into Corresponding Content Controls within a MS Word Document. The MS Word Document has also got Static Data with some Dynamic data to be Embed…
Bryan Jacob
  • 145
  • 1
  • 1
  • 6
9
votes
1 answer

Docx or XPS(or ooxml in general) Relationship transform example

Well I already know that there is a document about this, which states: 12.2.4.26 Relationships Transform Algorithm 13 The relationships transform takes the XML document from the Relationships part and converts it to another 14 XML document. 15 The…
lkn2993
  • 566
  • 7
  • 26
9
votes
1 answer

Calculate the size (Extents) of a text (TextBody) in OpenXML (PresentationML) PowerPoint (PPTX)

I want to create a presentation with data coming from a database. I manage to get valid presentations that open in PowerPoint (the Open XML Productivity Tool of the SDK 2.5 is a big help in doing this). But, how to calculate the size of the textbox…
outofmind
  • 1,430
  • 1
  • 20
  • 37
9
votes
1 answer

Using Excel sheet as a template vs. a "real" Excel template in OpenXML

Does anyone have any good answer what kind of difference there is between using some arbitrary pre-formatted Excel 2007 *.xlsx file as a template, loading it in my C# app, and filling up some of its cells with data using the Microsoft OpenXML SDK…
marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
9
votes
1 answer

Use SSIS to populate Excel workbook generated using OOXML

We are trying to generate MS Excel workbook using OOXML and populate data using SSIS. We are able to generate Workbook and sheets, also able to create columns and insert data in the Header cell. We can also populate data using SSIS. But the Sheet…
Maulik
  • 91
  • 3
9
votes
6 answers

How do you change the content of a content control in Word 2007 with OpenXml SDK 2.0?

About to go mad with this problem. I'm sure it's so simple I'm just missing it, but I cannot for the life of me find out how to change the content of a content control in Word 2007 with the OpenXml SDK v2.0 in C#. I have created a Word document with…
Jason
  • 8,400
  • 10
  • 56
  • 69
9
votes
1 answer

You must add a reference to assembly 'WindowsBase, Version=3.0.0.0

I'm currently writing up an upload system that takes XML from the document and will display it on a web page. The issue I'm facing, is that whenever I'm adding the XML extraction part of the website, the compiler will return the error as mentioned…
Alex
  • 673
  • 3
  • 9
  • 22
9
votes
3 answers

How to insert image into header of OpenXML Word document?

My OpenXML Word document generation project requires text, tables, and images. But first, I need a document header with a logo (image) in it. I've used the Microsoft example for creating headers and footers at Generating Documents with Headers and…
user2595824
  • 91
  • 1
  • 1
  • 3
9
votes
1 answer

How can I get the Worksheetpart from name or sheet ID in OpenXML?

The following creates an XLSX, adds two worksheets with some data. I then want to be able to get the spreadsheet later based on name (or preferably the id) so I can add/modify the sheets at a later point in time. I'm stuck on how to get the sheet…
WhiskerBiscuit
  • 4,795
  • 8
  • 62
  • 100
9
votes
2 answers

Where can I find good documentation on OpenXML

I'm looking to create powerpoint file in OpenXML. I'm looking to use the following features Bind bits of the page to an xml file. For example, one tag would be bound to the name field of an xml file. The plan is to simple drop the xml file in the…
diadem
  • 834
  • 2
  • 11
  • 24
9
votes
5 answers

OpenXml: Worksheet Child Elements change in ordering results in a corrupt file

I am trying to use openxml to produce automated excel files. One problem I am facing is to accomodate my object model with open xml object model for excel. I have to come to a point where I realise that the order in which I append the child elements…
mariner
  • 930
  • 3
  • 16
  • 25
9
votes
5 answers

.NET OpenXML performance issues

I am attempting to write out an Excel file from an ASP.NET web server using OpenXML. I have about 2100 records and its taking around 20-30 seconds to do this. Any way I can make it faster? Retrieving the 2100 rows from the db takes a fraction of a…
The Internet
  • 7,959
  • 10
  • 54
  • 89