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

How do I read data from a spreadsheet using the OpenXML Format SDK?

I need to read data from a single worksheet in an Excel 2007 workbook using the Open XML SDK 2.0. I have spent a lot of time searching for basic guidelines to doing this, but I have only found help on creating spreadsheets. How do I iterate rows in…
ProfK
  • 49,207
  • 121
  • 399
  • 775
16
votes
4 answers

SQL OpenXML Multiple Tag Issue

I am just new to reading in an XML file into a table through SQL Server Management Studio. There are probably better ways but I would like to use this approach. Currently I am reading in a standard XML file of records on people. A tag is…
user3441467
  • 161
  • 6
16
votes
7 answers

Opening excel file prompts a message box "content recovery of the workbook"

While I'm trying to open excel file a message box is prompting like "We found a problem with some content in file name. Do you want us to try to recover as much as we can? If you trust the source of this workbook, click Yes.". What actually done is…
Dinesh Haraveer
  • 1,784
  • 3
  • 31
  • 54
16
votes
3 answers

Creating Excel document with OpenXml sdk 2.0

I have created an Excel document using OpenXml SDK 2.0, now I have to style It, but I can`t. I don't know how to paint the background color or change the font size in different cells. My code to create a cell is: private static Cell…
JAiro
  • 5,914
  • 2
  • 22
  • 21
15
votes
3 answers

C# openxml removal of paragraph

I am trying to remove paragraph (I'm using some placeholder text to do generation from docx template-like file) from .docx file using OpenXML, but whenever I remove paragraph it breaks the foreach loop which I'm using to iterate…
edin-m
  • 3,021
  • 3
  • 17
  • 27
15
votes
1 answer

Create Merge Cells using OpenXML

Please consider this Excel: and it's XML: I want to create such this Excel that has multiple merged cells using OpenXML. How I can do this? thanks
Arian
  • 12,793
  • 66
  • 176
  • 300
15
votes
3 answers

Replacing Content Controls in OpenXML

I need something as a placeholder. I at first looked to Content Control as a solution but I'm having some problems with it. I then looked into adding CustomXML to the .docx but turned away from that because of the i4i lawsuit. Then I decided I would…
Ingó Vals
  • 4,788
  • 14
  • 65
  • 113
15
votes
8 answers

How much has Open XML caught on?

I'm curious as to how many people are using Open XML (OOXML) these days (either pure or via the SDK) in closed and commercial environments. I'm fairly aware of what's going on on the 'public web' (MSDN, OpenXMLDeveloper.org, etc.), but am wondering…
Todd Main
  • 28,951
  • 11
  • 82
  • 146
15
votes
3 answers

create word document with Open XML

I am creating a sample handler to generate simple Word document. This document will contains the text Hello world This is the code I use (C# .NET 3.5), I got the Word document created but there is no text in it, the size is 0. How can I fix it? (I…
Tuyen Nguyen
  • 4,389
  • 7
  • 51
  • 77
15
votes
2 answers

How to extract plain text from a DOCX file using the new OOXML support in Apache POI 3.5?

On September 28, 2009 the Apache POI project released version 3.5 which officially supports the OOXML formats introduced in Office 2007, like DOCX and XLSX. Please provide a code sample for extracting a DOCX file's content in plain text, ignoring…
Robert Campbell
  • 6,848
  • 12
  • 63
  • 93
14
votes
3 answers

How to create *.docx files from a template in C#

I have a working ASP.NET MVC web application to manage projects and customers. Now I want to generate a word file for some customers. In this file should be displayed some data about the customer. Every generated file should have the same data and…
Arthur S.
  • 482
  • 2
  • 8
  • 25
14
votes
8 answers

How to convert HSSFWorkbook to XSSFWorkbook using Apache POI?

How to convert org.apache.poi.hssf.usermodel.HSSFWorkbook to org.apache.poi.xssf.usermodel.XSSFWorkbook in Apache POI? Environment : JSE1.6 JBossAS 4.3.2 POI 3.7
Bhuvanesh Phadnis
  • 363
  • 1
  • 3
  • 9
14
votes
2 answers

OpenXML add new row to existing Excel file

I've got lots of XLSX files and I need to append a new row after the last one in the file. I'm using OpenXML and so far I know how to open/create spreadsheet, but my search for adding new rows to existing files returned nothing. Any ideas ?
james
  • 165
  • 1
  • 1
  • 6
14
votes
2 answers

How can i get actual used range for modified excels using Epplus?

I am reading data from excel to datable using EPPlus. After reading an excel sheet with 10 rows of record, I modified the excel sheet by removing existing data and kept data for only one row. But when I am reading the modified excel it still reading…
AcAnanth
  • 765
  • 3
  • 19
  • 53
14
votes
6 answers

OpenXML SDK: Make Excel recalculate formula

I update some cells of an Excel spreadsheet through the Microsoft Office OpenXML SDK 2.0. Changing the values makes all cells containing formula that depend on the changed cells invalid. However, due to the cached values Excel does not recalculate…
chiccodoro
  • 14,407
  • 19
  • 87
  • 130