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
1
vote
0 answers

OpenXML example for filtering pivot table?

I've been tasked with populating an Excel template with data (on sheet 1). The data in that sheet will be used to update 5 or 6 pivot tables on other sheets. That much is working so far with the code below. However, I'm trying to figure out how to…
EvanMcFly
  • 19
  • 1
1
vote
1 answer

Edit and Save DOCX Using Powershell

I have slightly modified this PowerShell script for my work with DOCX files but would like to edit the DOCX file in place. After running the script, the terminal displays the error message: "You cannot call a method on a null-value expression" in…
1
vote
1 answer

OpenXML Add TableHeader to table in Word Document

I am using .Net to create a Word Document with a dynamic table. This document can span multiple pages. I would like to add a table header to the table, such that every new page will have that header. I found this documentation, but nothing else: …
jason
  • 3,821
  • 10
  • 63
  • 120
1
vote
1 answer

Does anyone have experience building a Console App (C#) using the package DocumentFormat.OpenXML.DotNet.Core from NuGet?

I have successfully started a console app solution in Visual Studio 2019, in C#, and have downloaded and installed the package DocumentFormat.OpenXML.DotNet.Core from NuGet. Since DocumentFormat.OpenXML does not play with .NET Core, I cannot use…
D J Vellom
  • 23
  • 5
1
vote
1 answer

Created Excel file using OpenXML needs repair when opened in Excel

I am trying to insert Excel file (.xlsx) cell using C# openXML, but when I open the created Excel file it is need to be repaired by showing following error, Repaired Records: Cell information from /xl/worksheets/sheet1.xml part Here is my code.…
Ravihansa
  • 11
  • 1
  • 3
1
vote
2 answers

How to handle smartTag nodes using OpenXML

I have an application in C# which reads texts from a word (.docx) file using OpenXML. In general, there is a set of Paragraphs (p) which contain Run elements (r). I can iterate over the Run nodes with foreach ( var run in para.Descendants()…
Phil Jollans
  • 3,605
  • 2
  • 37
  • 50
1
vote
0 answers

How to rotate text in Excel spreadsheet cell using OpenXML and C#

I'm trying to finish little application which is creating MS Excel spreadsheet filled with some data taken from a database. I got stucked with few things. One of these is how to rotate a text in a spreadsheet cell. I was trying to do it in that…
Bart
  • 11
  • 3
1
vote
1 answer

c# OpenXML WordprocessingDocumentType Insert HTML fragment in TableCell

Is it possible to insert a HTML fragment into a TableCell for a WordProcessingDocument created using OpenXML? For example, when I use: public void WriteWordFile() { var fileName = HttpContext.Current.Request.PhysicalApplicationPath + "/temp/" +…
kyletme
  • 441
  • 4
  • 17
1
vote
1 answer

Underline doesn't display in Ooxml

I am debugging a Word office js add-in. One thing that it needs to do is create a hidden section in the word document. To do this, I pass in some information to a javascript function that creates an OoXML string. I give the user the ability to embed…
Ned Balzer
  • 35
  • 6
1
vote
0 answers

OpenXml creates corrupted Excel when there is a large number of rows

I implemented this method to create an Excel spreadsheet using openxml. It works 100% of the time when the number of rows is under around 15000 rows, otherwise the Excel will sometimes come out corrupted with Excel showing a message The workbook…
Slothman
  • 11
  • 2
1
vote
1 answer

How to repeat table group header on every page in SSRS(RDLC Report) when outputting to [Word] Documents?

As mentioned in MS Documenation: Word does not repeat header rows on page two and greater, although you set the RepeatOnNewPage property of the static header row in a tablix (table, matrix, or list) to True. You can define explicit page breaks in…
HardcoreGamer
  • 1,151
  • 1
  • 16
  • 24
1
vote
1 answer

How to apply margin in Presentation Document using OpenXml

I wrote code to create Presentation Document using open-xml SDK. I follow this sample code. MSDD Sample Code. Now i need to apply margin before starting my text. I've tried below code but didn't get expected result. slidePart1.Slide = new Slide( …
Md. Zakir Hossain
  • 1,082
  • 11
  • 24
1
vote
1 answer

Accept Insertion and reject deletion openxml

I need to compare two Word files and merge all insertions into a third one. I have managed to do that with OpenXML-Power-Tools and WmlCompare, but how do I reject only deletions? Accepting insertions is easy with OpenXmlPowerTools.RevisionAccepter…
knile
  • 318
  • 3
  • 15
1
vote
1 answer

Programmatically add repeating section item to a word document using OpenXml.WordProcessing .NET

I have a document template which I want to dynamically populate using C#. The template contains a repeating section that has a few text boxes and some static text. I want to be able to populate the text boxes and to add new section items when…
1
vote
3 answers

Adding HTML to Word using OpenXML but unable to style the content (.Net Core)

I managed to add HTML (text only) to a Word-document following this post Add HTML String to OpenXML, using an already existing Word-file. Unfortunately, I can't find any solution to use style from this Word-template for my newly added text. It is…
chris3331
  • 23
  • 6
1 2 3
99
100