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

How to resize and image in a PowerPoint presentation using c# and OpenXML

Apologies if this has already been answered but I've seen plenty of posts along similar lines and nothing has so far helped me. Basically I'm building an app that takes a PowerPoint 'template' and replaces text and images sourced from a database.…
Alan Schofield
  • 19,839
  • 3
  • 22
  • 35
7
votes
1 answer

OpenXML SDK border on merged cells only applied to first cell

When using the OpenXML SDK to apply a border to a merged cell range, the border is only showing up for the first (top left) cell in the merge range. I have absolutely no idea and this is driving me crazy. Using the productivity tool I can't find…
sovemp
  • 1,402
  • 1
  • 13
  • 31
7
votes
1 answer

Value of BlipExtension Schema URI: "28A0092B-C50C-407e-A947-70E740481C1C"

Question The class DocumentFormat.OpenXml.Drawing.BlipExtension has a property called Uri. In numerous examples I've seen the value 28A0092B-C50C-407e-A947-70E740481C1C used; but never found what this value is / whether it's important, or if it's…
JohnLBevan
  • 22,735
  • 13
  • 96
  • 178
7
votes
3 answers

ClosedXML Adding Data to Existing Table

With ClosedXML I am trying to add data to an existing Excel Sheet In an Existing Table. The easy thing to do is to add a table to an excel sheet below is a quick example of how to do that. What I don't understand is if you already have a Table there…
scripter78
  • 1,117
  • 3
  • 22
  • 50
7
votes
2 answers

Create Excel file with style tag using OpenXmlWriter SAX

I am trying to write an Excel Xlsx spreadsheet with styling using OpenXmlWriter (SAX). I am able to create the file with rows and columns (populate them as strings). I am looking for a simple code on how to make the first row (header) with bold…
odansky
  • 73
  • 1
  • 1
  • 4
7
votes
1 answer

OpenXml "Can not access a closed stream" only on production

Production Environment: Server 2008 R2, Application pool running as network service. I'm running into this issue in production on a specific line and I cannot understand why it is failing. Log with stack trace: 2015-02-03…
Shawn
  • 2,356
  • 6
  • 48
  • 82
7
votes
2 answers

IsolatedStorageException in Ms Word Addin

I created a Word add-in project with a ribbon, and when I want to save the document, after several modifications with OpenXml, an exception is raised. Dim MainXMLDoc As New XmlDocument() Using WordDoc As WordprocessingDocument =…
7
votes
1 answer

Applying number formatting in OpenXML

I'm trying to create an Excel spreadsheet from scratch using OpenXML and I've got everything working okay (dumping actual values into actual cells), but now I'm trying to apply number formatting to columns and I'm running into a problem. I have…
Matt Burland
  • 44,552
  • 18
  • 99
  • 171
7
votes
3 answers

Search and replace placeholders split up to multiple -Elements

I´m trying to create reports from .docx-Templates using the Open XML SDK 2.5. Within the templates I have defined some placeholders that get replaced by real values. The placeholders can be defined in various schemas such…
Jehof
  • 34,674
  • 10
  • 123
  • 155
7
votes
1 answer

Best practices to debug broken OpenXML word document in C# generation

I'm generating a MS Word document with OpenXml package in C#. Many times I've seen this erorr message: This error message is pretty useless: all it says the problem is in footer. Most of the times it says the error is on line 1, char 1. I usually…
trailmax
  • 34,305
  • 22
  • 140
  • 234
7
votes
1 answer

Create New Empty Word Document

I'm trying to create an empty Word document (DOCX) using OpenXML SDK 2.5. The following code is not working for me because MainDocumentPart is null. public static void CreateEmptyDocxFile(string fileName, bool overrideExistingFile) { …
yazanpro
  • 4,512
  • 6
  • 44
  • 66
7
votes
4 answers

How to convert docx to html file using open xml with formatting

I know there are lot of question having same title but I am currently having some issue for them I didn't get the correct way to go. I am using Open xml sdk 2.5 along with Power tool to convert .docx file to .html file which uses HtmlConverter class…
Sachin
  • 40,216
  • 7
  • 90
  • 102
7
votes
2 answers

Open XML SDK v2.0 Performance issue when deleting a first row in 20,000+ rows Excel file

Do anyone come across a performance issue when deleting a first row in a 20,000+ rows Excel file using OpenXML SDK v2.0? I am using the delete row coding suggested in the Open XML SDK document. It takes me several minutes just to delete the first…
7
votes
3 answers

Insert HTML into OpenXML Word Document (.Net)

Using OpenXML SDK, I want to insert basic HTML snippets into a Word document. How would you do this: Manipulating XML directly ? Using an XSLT ? using AltChunk ? Moreover, C# or VB examples are more than welcome :)
Nico
  • 13,320
  • 6
  • 32
  • 33
7
votes
2 answers

OpenXML writer column

I have a question to ask using OpenXMLWriter. I am currently using the code below to create my excel file, but I want to set up width of the columns. How should I do it? Because I tried to write new Columns in between Worksheet() and SheetData()…
user2438754
  • 71
  • 1
  • 2