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

Get the name of tag and attribute in XML

I have to process an XML file with following format:
zening.chen
  • 111
  • 8
1
vote
1 answer

Powershell script to unzip xlsx and read contents from a sheet xml file

Background I am trying to design a script that I can run on a server without an Excel installation or importing modules/libraries. This rules out COM Excel.Application, the ImportExcel module and other 3rd party libraries. Instead, I unzip the excel…
Blaisem
  • 557
  • 8
  • 17
1
vote
0 answers

Change decimal and thousand separator in Open XML for Excel files

I'm trying to generate an Excel file using Open XML. Sometimes I need the numeric values on each cell to be displayed with the american separator pattern - comma for thousand, dot for decimal. By default, open XML will show me those values in the…
SuavestArt
  • 193
  • 1
  • 6
1
vote
0 answers

Can number of lines in Word OpenXML Table of Contents be determined

Say a Word Table Of Contents has 8 lines in it, generated by a Table of Contents field in the normal way. Is it possible, using C# and Microsoft Open XML, to determine how many lines (in this case 8) are in a Table of Contents field in an existing…
Jimmy
  • 23
  • 5
1
vote
1 answer

Open XML Create Link to other Worksheet

I'm having a hard time finding out what the XML looks like for adding a link in one worksheet to another. I'd like something like this: MainSheet Cell Cell Cell data data LinkToSheet2 data data LinkToSheet3 data …
Nate
  • 30,286
  • 23
  • 113
  • 184
1
vote
0 answers

The legend is not displayed correctly

In general, I'm trying to draw a simple graph through OpenXML, but I don’t understand why the clumsy legend is obtained: I expect to see “Итого” on the right, and get a set of header values. I can’t understand what is missing in the Chart.xml…
iluxa1810
  • 278
  • 3
  • 12
1
vote
1 answer

OpenXML preserving formats on break lines (problems)

I'm having serious problems with the breaks in a Word document generation. this is my library funcion I'm using for send text in a BookMark: public void sentText(string _BkMk, string _text, bool _break, RunProperties _rProp) { …
Displaying
  • 117
  • 3
  • 8
1
vote
1 answer

ClosedXML relative range Exception in sample code

I had a problem with selecting relative range to another range inside worksheet in ClosedXML. So to be sure how it works I tried example code. var ws = wb.Worksheets.Add("Sample Sheet"); // From worksheet var rngTable = ws.Range("B2:F6"); // From…
gtu
  • 707
  • 1
  • 10
  • 22
1
vote
0 answers

I cannot change FontSize when trying to modify text style in docx by using DocumentFormat dll

I looked at document.xml of my Template. There are "w:sz", "w:szCs", "w:lang", "w:b" inside for "w:p" and "w:r". I opened my doc.docx and only saved using DocumentFormat.dll. I see that appropriate text is in "w:t" element of a "w:r" of a "w:p"…
1
vote
1 answer

How to export data from C# from List or IEnumerable to Excel (MS OpenXml)?
I'm trying to export a List or IEnumerable to an Excel file using the library Open XML of Microsoft. Library: https://github.com/OfficeDev/Open-XML-SDK Example of similar request:…
MiBol
  • 1,985
  • 10
  • 37
  • 64
1
vote
1 answer

OpenXML PowerTools: is it possible to write an Excel spreadsheet to a .Net MemoryStream?

I'm creating an Excel spreadsheet programmatically with PowerTools. I installed PowerTools 4.5.3.2 in my C#/ASP.Net Core project with Nuget. The project also uses DocumentFormat.OpenXml v2.9.1. I can generate the spreadsheet OK. BUT ... I would…
FoggyDay
  • 11,962
  • 4
  • 34
  • 48
1
vote
0 answers

EPPLUS doesn't clearly identify the RichText properties

I have a few excel sheets which I want to parse using EPPlus. Some cells in my excel worksheet contain texts as Bold, Italics or Underlined. e.g: 0 = "Water" 1 = "Air" When I read this cell, I get 2 elements in the RichText collection (one…
AKK
  • 35
  • 5
1
vote
2 answers

How to read Word Paragraph Line by Line in C#?

I am trying to read word content line by line. But I am facing an issue. When trying to read paragraph. If paragraph content is multi line. I am getting single line internally. Can any one please help me on this. Expected Output: Line 1 - > TERM…
1
vote
1 answer

How to extract font family from OOXML using Apache POI?

I am trying to extract the font style that is applied to a specific paragraph with Apache POI. The method getStyle() returns null on the my XWPFParagraph object. Calling the method getCTR().getRPr().getRStyle() on the first XWPFRun object also…
Jens
  • 11
  • 2
1
vote
0 answers

Custom Column width OpenXml (excel)

I'm new to OpenXml and I'm trying to generate an excel file with custom column width. I've searched for solution online and here but every solution produce the same error. I've tried this: private byte[] GenerateExcelFromTreeData(TreeData[]…
abecce
  • 11
  • 1