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
8
votes
2 answers

Inserting text after a bookmark in openxml

I am looking for a way to insert some text after a bookmark in a word doc using openxml. So far, i have been able to locate the bookmark using the following: var bookmarks = mainPart.Document.Descendants().ToList(); var…
John Baum
  • 3,183
  • 11
  • 42
  • 90
8
votes
2 answers

How can I make a SQL table from an XML file that will have a dynamic number of nodes?

I'm using SQL Server 2008. The task: take an XML file and parse it into a(n) SQL table. The problem: The number of columns and their names will vary based on the XML. Here's some code: DECLARE @xmlData XML; SET @xmlData = '
Sergey
  • 1,608
  • 1
  • 27
  • 40
8
votes
2 answers

Office Open XML (OOXML) Specification: Encryption

I am trying to understand how encrypted ("password protected") Office 2007 documents are bundled (specifically, Excel documents). I am experimenting with a known, password protected spread sheet. When I unzip the XLSX file, I encounter three…
Adam Paynter
  • 46,244
  • 33
  • 149
  • 164
8
votes
3 answers

Creating OpenXML documents using JavaScript

I have an application that needs to create simple OpenXML documents (in particular PowerPoint presentations) using JavaScript. Can anyone suggest how to get started on this please (or even if it is possible)? I've used the Microsoft OpenXML SDK for…
Appetere
  • 6,003
  • 7
  • 35
  • 46
8
votes
1 answer

Excel to SQL, C# libraries

I have an excel spreadsheet that a client has given me which is broken down into multiple worksheets. I need to extract certain columns from each worksheet on a row-by-row basis and to iterate through each worksheet (all identical templates) to dump…
Nick Lewis
  • 772
  • 1
  • 10
  • 20
8
votes
4 answers

How can I create a header in a table for each new page with OpenXml Wordprocessing

I am trying to create a table with a header. I want this header to be repeated for each new page that the table takes. How can I do this in C# and OpenXml Wordprocessing? DocumentFormat.OpenXml.Packaging.WordprocessingDocument internalDoc =…
RRR
  • 575
  • 1
  • 11
  • 25
8
votes
2 answers

How to add Cell Comments to Excel sheet using POI?

I am using the following code to generate excel. http://www.docjar.com/html/api/org/apache/poi/xssf/usermodel/examples/BigGridDemo.java.html import java.io.*; import java.util.*; import java.util.zip.ZipEntry; import java.util.zip.ZipFile; import…
Jwala Prakash
  • 91
  • 1
  • 1
  • 3
8
votes
3 answers

Best place for unique ID in DOCX (Open XML WordprocessingDocument)

I am looking for a way to indentify DOCX files if they are moved or renamed. Reason is obvious, I am playing with the Open XML SDK, building a hyperlink checker. Works perfect, at least it can add or update hyperlinks in a document. Problem is,…
Chris
8
votes
1 answer

Copying OLE Objects from one slide to another corrupts the resulting PowerPoint

I have code that copies the content of one PowerPoint slide into another. Below is an example of how images are processed. foreach (OpenXmlElement element in sourceSlide.CommonSlideData.ShapeTree.ChildElements.ToList()) { string elementType =…
Robert Harvey
  • 178,213
  • 47
  • 333
  • 501
8
votes
4 answers

OpenXML SDK 2.0 vs Aspose for server side word 2007 document generation in .NET

I am going to start a Server side Office automation project in .Net. Below are the key activities that are planned: Create a word document Use a existing word document template having cover page, header, footer, TOC Save file Embed files and resize…
Ajit Singh
  • 1,016
  • 13
  • 26
8
votes
5 answers

How do I convert a .docx to html using asp.net?

Word 2007 saves its documents in .docx format which is really a zip file with a bunch of stuff in it including an xml file with the document. I want to be able to take a .docx file and drop it into a folder in my asp.net web app and have the code…
Guy
  • 65,082
  • 97
  • 254
  • 325
8
votes
3 answers

Adding Chart to WordprocessingML

I would like to generate an Open XML document containing a Chart using the Open Xml SDK 2. I found an SpreadsheetML example, but I can't work out how to add the chart in a .docx... Is there a good source for documentation/examples for the Open Xml…
herskinduk
  • 1,187
  • 6
  • 14
8
votes
1 answer

Inserting image content from Rest API to currently opened document in Microsoft Word

Edit: This question's text has been changed to reflect utilizing open xml code and interop. I'm trying to insert a base 64 encoded image to a Word document via a ribbon. The following code is for reproduction purposes: public partial class…
C Bauer
  • 5,003
  • 4
  • 33
  • 62
8
votes
1 answer

OpenXml Force image fit in parent container

I'm parsing a piece of hmtl into a word document using the following code //Need the following packages // //
George Vovos
  • 7,563
  • 2
  • 22
  • 45
8
votes
1 answer

Converting embedded Excel objects from a docx file into images

I am using pandoc (via pypandoc) to convert docx files into markdown, on a non-Windows machine. Those files can contain images, but also other embedded objects. pandoc is actually able to translate embedded Powerpoint presentations (into EMF files),…
fralau
  • 3,279
  • 3
  • 28
  • 41