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

OpenXML - Apply bookmarks to paragraph in word document

Below code works fine using OPENXML (asp.net) and print us elements in word document with HEADING2... how can we apply bookmark to specific paragraph.. What we r trying is extract sections between two HEADINGs...We are wondering how to apply…
user3657339
  • 607
  • 2
  • 9
  • 20
6
votes
1 answer

Read Password Protected Excel Files Using OpenXml

I have an Excel file which is password protected. I am using OpenXml to read the excel files. As shown in the below code snippet, there is no overload/ Optional Parameter to specify Password. _document = SpreadsheetDocument.Open(_stream, false); I…
Saurabh Rai
  • 361
  • 2
  • 18
6
votes
1 answer

How i can merge Microsoft Word table cells horizontally using OpenXML C#

I have a table in Microsoft Word. I need to merge two cells in a row of a table. I get the cells I need: Wordprocessing.TableRow row = table.Elements().ElementAt(i); Wordprocessing.TableCell cell1 =…
bvl
  • 161
  • 2
  • 12
6
votes
2 answers

Programmatically format a date in an excel sheet using Office Open Xml SDK

I'm building an Excel xlsx spreadsheet using the office open XML SDK. I can add dates to the sheet by converting them to their "AO" date representation and setting the Cell Value to number. I can't, however, figure out how to add the dd-mm-yy…
Marcus
  • 111
  • 1
  • 1
  • 10
6
votes
2 answers

Copying a slide from one presentation to another using Open XML SDK

Sorry my English :) There is a code using (var sourceDoc = PresentationDocument.Open(@"d:\source.pptx", false)) { using (var destDoc = PresentationDocument.Open(@"d:\dest.pptx", true)) { } } I try copy slide №2 from sourceDoc and paste…
Adam Shakhabov
  • 1,194
  • 2
  • 14
  • 35
6
votes
4 answers

Extract DOCX Comments

I'm a teacher. I want a list of all the students who commented on the essay I assigned, and what they said. The Drive API stuff was too challenging for me, but I figured I could download them as a zip and parse the XML. The comments are tagged in…
Andrew Saltz
  • 305
  • 4
  • 16
6
votes
3 answers

What is the best way to store XML data in an Excel file

I am looking for a way to store XML data in an Excel file. The data should be completely hidden to the user, it should not be in a cell or comment, even hidden. Also, the data should be preserved when the user opens and then saves the file with…
user542393
  • 103
  • 1
  • 6
6
votes
2 answers

How do I convert Excel OpenXML shared strings to inline strings?

I have a large spreadsheet in Excel 2007 OpenXML format that I want to manipulate in xml programmatically. Excel saves it using the shared strings method which, while more efficient, complicates the process. Does anyone know if there is an option…
AgentThirteen
  • 261
  • 1
  • 4
  • 8
6
votes
3 answers

how to programmatically access the builtin properties of an open xml worddoc file

i would like to access some built in properties(like author,last modified date,etc.) of an open xml word doc file. i would like to use open xml sdk2.0 for this purpose. so i wonder if there is any class or any way i could programmatically access…
stazera
  • 293
  • 1
  • 3
  • 9
6
votes
2 answers

Removing a formula from Excel using OpenXML

I am trying to remove all formulas from a sheet using openxml. This what I am trying: internal static void ReplaceFormulaWithValue() { var res = _worksheetPart.Worksheet.GetFirstChild().Elements(); foreach (Row row in…
Tacy Nathan
  • 344
  • 1
  • 6
  • 15
6
votes
1 answer

How to make a section optional when mapped to optional data in a Word OpenXml Part?

I'm using OpenXml SDK to generate word 2013 files. I'm running on a server (part of a server solution), so automation is not an option. Basically I have an xml file that is output from a backend system. Here's a very simplified example:
Steve B
  • 36,818
  • 21
  • 101
  • 174
6
votes
3 answers

How do we convert a Microsoft Word DOCX file to HTML in XSLT?

I have project about transforming Word DOCX XML (OOXML) files to HTML format. I use XML Spy and XSLT, XPath, XML for this transformation. Imagine a single Word file that I write a program in XSLT and transform it. But my supervisor says that if i…
Sojimanatsu
  • 619
  • 11
  • 28
6
votes
6 answers

Diff 2 Open XML Word Documents

Thanks in advance for any help and assistance. I'm trying to find some utility / direction on how best to compare two word docx files (Original and modified version) for differences and then to highlight the changes in the modified version in…
Emlyn
  • 700
  • 1
  • 8
  • 22
6
votes
1 answer

Export data to Excel Macro-enabled through Open XML

I have an Excel Sheet which I am using as a template file for exporting data. The Excel Sheet is XLSM file and has few codes written in it in VBA. Each time the file is copied and renamed with time stamp and data should be written to copied xlsm…
sunny
  • 164
  • 4
  • 17
6
votes
2 answers

Converting Excel XML-Spreadsheet into xlsx

i have got a XML-Excel file (SpreadsheetML format):
Saftpresse99
  • 849
  • 7
  • 16