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.

Filter by
Sorted by
Tagged with
0 votes
0 answers
12 views

Error opening document created with Apache POI when containing BAR Chart

I successfully created .DOCX files with Apache POI for many months. The files could be opened successfully with all Versions of Microsoft Word. All of sudden, the files can't be opened with Word 365, ...
Mark Us's user avatar
0 votes
1 answer
23 views

OpenXML generates excel successful but every time I open file it shows errors

I am creating a simple generic OPENXML excel generator that can be installed as a nuget package so that we can use it to generate excel throughout our project's. The excel generates correctly and when ...
Xander Taylor's user avatar
0 votes
0 answers
27 views

C# – Open XML SDK – Insert embedded Excel object to Word document

I'm trying to copy a table from Excel Sheet to Word Document as an Excel object. The table has a lot of formatting and colours and merged cells so I think the Excel object should be better than a ...
grep's user avatar
  • 3
0 votes
1 answer
33 views

Unable to export aspx gridview to .xlsx file

Hoping someone more knowledgeable with C# can point out where i'm going wrong please. Being a Powershell scripter and relatively new to C#, I've added a button to my web page that attempts to export ...
LukeFFP's user avatar
0 votes
0 answers
21 views

How to import excel data to dataset without precise values from a column using c# with openXML?

My excel having the data as B 0.23 0.356 The column B having precise decimal like 0.234567 and 0.35689 but i don't want that data.I want the data what i seen. From below code i'm getting the output as ...
shafi7468's user avatar
  • 323
0 votes
0 answers
37 views

In Apache POI Adding a new paragraph at a specified place while iterating is giving Concurrent Modification Exception

Following is the code which is while iterating adding a new paragraph before a specific paragraph. public void resolveBodyElements1(List<IBodyElement> elements) { for(IBodyElement ...
Furqan Ahmed's user avatar
0 votes
1 answer
31 views

Remove green triangle in excel with 13 numbers using winnovative vb.net

I'm using to create an MS/Excel spreadsheet file. other columns has 13 digits, Excel displays those cells with a small green triangle in the corner, along with the warning that "The number in ...
renge's user avatar
  • 1
0 votes
0 answers
46 views

Replace text in docx document

I'm using OpenXml to replace text in docx document via my C# code. For this reason I'm using SearchAndReplace method from https://learn.microsoft.com/en-us/office/open-xml/how-to-search-and-replace-...
Bohdan's user avatar
  • 158
3 votes
0 answers
37 views

Updating Shape and Chart Positions After Inserting Columns Using Open XML

In Excel when you select a column, rmb and select to 'Insert' a new column will be inserted and if there are any shapes or charts in the affected area, they are expanded accordingly. I am trying to ...
tdw's user avatar
  • 31
1 vote
0 answers
28 views

OpenXML C# Excel creation with LineChart [closed]

I would like to generate a Chart image without using any third-party tool or win forms support. I tried following this https://learn.microsoft.com/en-us/office/open-xml/how-to-insert-a-chart-into-a-...
Pavithran R's user avatar
0 votes
3 answers
40 views

Use ClosedXml to convert an XML document in OpenXML format

I have an XmlDocument in OpenXML format. Looks like this: <?xml version="1.0" encoding="utf-8"?> <?mso-application progid="Excel.Sheet"?> <Workbook> ...
Jjmboni's user avatar
  • 71
0 votes
0 answers
19 views

OpenXML with C#: replacing bookmark with HTML content

I am using OpenXML to replace bookmarks in a docx file with text. I am able to do this but with plain text only. If I replace it with HTML, the document shows raw HTML instead of formatted document. ...
1050158's user avatar
0 votes
0 answers
30 views

Open XML SDK: How to retrieve parent OpenXmlPart from a TypedOpenXmlCompositeElement?

Is it possible to retrieve the parent DocumentFormat.OpenXml.Packaging.OpenXmlPart instance for a DocumentFormat.OpenXml.Presentation.TypedOpenXmlCompositeElement? For instance, in the code below, I ...
Adam Shakhabov's user avatar
0 votes
0 answers
23 views

How to inherit style creating a new Run in Word

I'm using the new namespace DocumentFormat.OpenXml.Wordprocessing to manipulate Word files. A bookmark is set manually and the program populates it with a specific content. This works as supposed to. ...
Konrad Viltersten's user avatar
0 votes
1 answer
40 views

OpenXML:The value of shape offset is clearly abnormal

A few shapes have values that seem to be incorrect. The test file link: file For example, the shape with name "s-4-4" in the attached file "test1.pptx", after unzipping the ppt, ...
leon liu's user avatar
0 votes
2 answers
56 views

Why does Java's XPath evaluator require a custom prefix for an anonymous namespace while querying OpenXML files?

I'm trying understand how XPath evaluation works for OpenXML files and specifically Excel in the following snippet (for brevity I removed irrelevant nodes): <?xml version="1.0" encoding=&...
t3chb0t's user avatar
  • 16.5k
0 votes
0 answers
43 views

Lock/Unlock certain sections in the Word document using OpenXML

I have a Word document that has the following structure: Paragraph Header1 Content Paragraph1 Paragraph Header2 Content Paragraph2 Paragraph Header3 Content Paragraph3 I need to find a way how to ...
Michael's user avatar
  • 51
1 vote
1 answer
31 views

Applying Tint value to RGB color (PowerPoint)

I am parsing PowerPoint file and trying read colors used. Following is small part from parsed ppt file. Here I am trying to get proper RGB color. <a:solidFill> <a:schemeClr val="tx1&...
Chetan's user avatar
  • 59
0 votes
0 answers
23 views

Putting the page number as a footer on the page when outputting the html code to word

I tried to write a text in the footer part of the word with the code I wrote below, but it did not even write any text to the output. Actually, what I need is to write the page number as a footer in ...
irmsahin's user avatar
2 votes
1 answer
58 views

Replace the header in a docx with the header image from another docx

I'm currently trying to replace the header in a docx with the header image from another docx, I followed the example from the ms docs, but it seems it is not designed to transfer images from a header ...
Guilherme's user avatar
1 vote
1 answer
68 views

Unable to XPath parse the bullet point type in Word document using OpenXML

With the following MS Word document which only contains two bullet points of separate lists each encapsulated in one-cell tables. How do I use the Word document's underlying document.xml, numbering....
Parfait's user avatar
  • 105k
1 vote
0 answers
35 views

Manipulate Active Document using openxml in c#

I wrote a program using C# (Windows Form) that hosts MS Word inside a form (using Win Api) and the user can work with it. I don't want to use Microsoft.Office.Interop.Word to manipulate the active ...
S.Parseh's user avatar
0 votes
0 answers
12 views

Importing .XLSX file to Navision throws an error verticalDpi has invalid value '0'

I have an excel file that I'm importing to Microsoft Navision and now when Upload it throws an error "The spreadsheet is corrupted. The following error occurred: The attribute 'verticalDpi' has ...
Ignas's user avatar
  • 1
1 vote
0 answers
33 views

OpenXML - Creating multiple pages based on a single template page

I use Visual Studio to create programs, using WinForm and library OpenXML. I have one Word template, one page; template.docx and I would like to generate a new Word document using the template. How do ...
Stipa88's user avatar
  • 21
0 votes
0 answers
40 views

insertFileFromBase64 & insertOoxml not working as expected in Word Online Office JS

Hey StackOverflow Community, I'm facing an issue with two methods, "insertOoxml" and "insertFileFromBase64," which are working perfectly in Word Offline but not in Word Online API. ...
Hardik Shah's user avatar
1 vote
0 answers
68 views

How does to get a byte array of updated via DocumentFormat.OpenXml word document?

I am trying to get a C# method that will update .docx file and return a byte array of updated file. I'm using DocumentFormat.OpenXml for .docx files handling. The byte array of the original (non-...
Bohdan's user avatar
  • 158
1 vote
1 answer
48 views

Why does modifying a WordprocessingDocument that was opened from a Stream result in a corrupted file?

I'm using the DocumentFormat.OpenXml package to replace text in a .docx file. Got an issue with it, so started to do some investigations in order to get a deeper understanding of how DocumentFormat....
Bohdan's user avatar
  • 158
1 vote
0 answers
22 views

How to adjust column width In openxml Library

using (SpreadsheetDocument document = SpreadsheetDocument.Create($"{masterType}.xlsx", SpreadsheetDocumentType.Workbook)) { WorkbookPart workbookPart = document.AddWorkbookPart(); ...
Sai Charan's user avatar
1 vote
1 answer
117 views

Create groupable tables in PowerPoint with VBA

By changing <a:graphicFrameLocks noGrp="1"/> to <a:graphicFrameLocks noGrp="0"/> as per OOXML Hacking: Locking Graphics's article, it is possible to quickly enable the ...
Oran G. Utan's user avatar
0 votes
1 answer
20 views

How to save the file with a json response

response gets a json of something like this: {'additionalErrors': None, 'data': {'contentType': 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'file': '...
po100lit's user avatar
2 votes
0 answers
26 views

What are the prefixes associated with Excel functions in the xml files which excel writes

Excel has a large variety of functions which we can use in cells. When we see the XML files for the excel, we find the formula is set in the <f> (formula tag) inside <c> (cell tag). Some ...
Jayant's user avatar
  • 46
0 votes
1 answer
34 views

OpenXML clone table multiple times

I have a word document with a table inside. I am trying to clone that table multiple times inside the document. The code below successfully does that job, but after I save and try to open the file I ...
somerandomname's user avatar
0 votes
1 answer
48 views

Is there a solution for creating right-to-left tables using python-docx?

I have been trying to create tables in right-to-left direction (meaning the first column is on the rightmost side of the table) using python-docx package in a word document. But I did not find any ...
Sina's user avatar
  • 1
0 votes
0 answers
27 views

Using Apache POI replace an XWPFParagraph with another XWPFParagraph at the same position in the document

I am using Apache POI to edit Docx documents. What I am trying to achieve is to rearrange an XWPFParagraph's runs by adding new runs to the XWPFParagraph, but inserting new runs to a paragaph is ...
Furqan Ahmed's user avatar
0 votes
1 answer
59 views

How to insert an empty cell to a DocumentFormat.OpenXml.Spreadsheet.Row?

I'm using DocumentFormat.OpenXml 2.20.0 to insert a row to a sheet in an Excel file. I use the code below to append cells into a row then insert the row to the sheet. // Alloc a new row. Row newRow = ...
Chu Bun's user avatar
  • 543
0 votes
0 answers
26 views

Digitally signing word documents

When using the full .net framework, signing a word document was not hard. However, it seems like the helper classes (ex.: PackageDigitalSignatureManager) are not available in net core. Can anyone ...
Luis Abreu's user avatar
  • 4,038
0 votes
0 answers
14 views

OpenXml replace bookmark text without lossing styles

Is it possible to change a bookmark text without deleting the style? If not, is it possible to obtain the style of the bookmark, copy and insert the style in the new text? My code: using (...
pata's user avatar
  • 959
1 vote
0 answers
70 views

Unable to restart numbering list in a word document using openxml namespaces in C#

There is a word document with multiple tables which contains two columns. Column2 can have Hyperlinks, screenshots, nested tables, bulletin list and so on. The Code should read the Column2 content and ...
Bubbles's user avatar
  • 21
0 votes
1 answer
49 views

Excel Data Validation in Python

I wanted to create a dropdown list in my excel sheet using python. The source is inside another sheet but inside the same file. Currently, I'm using this method to do the validation. def ...
WernerZiegler's user avatar
0 votes
0 answers
60 views

DocumentFormat.OpenXml 2.20.0 -does it work on .net 7 on linux?

I'm wondering if DocumentFormat.OpenXml 2.20.0 will be working on .net7 on linux machine.
Zabaa's user avatar
  • 327
0 votes
1 answer
60 views

How to apply a docx footer available in last page to all pages using python-docx?

I am trying to change the page orientation to landscape using Quarto when generating docx (based on this SO). Although it changes the orientation, the footer is misplaced. In the document which is ...
Selva's user avatar
  • 941
0 votes
1 answer
52 views

C# How to fix popup alert "Do you want us to try to recover ..." when I try to open excel file

On C#, I use openxml to generate excel file and process is success I got excel file. but when I click to open that file I got popup alert "We found a problem with some content in 'zzz.xlsx'. Do ...
unisrn's user avatar
  • 11
0 votes
0 answers
15 views

OpenXML PPT table gets created on foreground, making the slide title and other texts go in background

I have a scenario in which there are {placeholder Tags} in a PowerPoint template, which gets replaced by a table. The problem is the table gets created in the foreground, making the slide title and ...
sweta singh's user avatar
1 vote
0 answers
30 views

How to write text to empty bookmark value which is under text form field using openxml

I would like to insert/write text to book mark which is under text form field of the existing Microsoft word using c#. Default value of bookmark is Null. If I use below line of code with the help of ...
Khaing's user avatar
  • 23
1 vote
2 answers
73 views

How to get Table/Cells data based on Defined Name/Defined name Range in Excel using OpenXML & C#

I've One Excel file with multiple sheets. In one sheet I've 2-3 tables like data. Each table data having one defined name. Now I want to get the respective table data based on the defined name. I'm ...
Jack's user avatar
  • 13
0 votes
0 answers
51 views

Number Formats for different locales in Excel (OOXML)

In the ISO/IEC 29500-1 Part 1 Section 18.8.30, the documentation presents us with the built in numFmt (number formats) used by excel whose format code is implied and not explicitly stored. These ...
Jayant's user avatar
  • 46
0 votes
1 answer
83 views

Using open xml sdk code, how to resize a table (in ms word document) to fit into table contents?

In MS Words, to make the columns in a table automatically fit the contents, we click on the table. On the Layout tab, in the Cell Size group, click AutoFit, and then click AutoFit Contents. For ...
EvaKaf's user avatar
  • 35
0 votes
0 answers
53 views

Excel file created with Open XML in C# cannot be opened after deployment on AWS

I have developed a asp.net core api that generates an Excel document using Open XML. Locally, the generated Excel file is working perfectly fine, and I can open it without any issues. However, when I ...
Lewis 's user avatar
  • 73
0 votes
0 answers
32 views

POI Missing method after upgrade

`when I upgrade 'org.apache.poi:ooxml-schemas:1.4' to 'org.apache.poi:poi-ooxml-full:5.2.3',some method cannot find my dependencies: implementation 'org.apache.poi:poi:5.2.3' implementation '...
Tizliu's user avatar
  • 1
1 vote
1 answer
147 views

How To Update Table of Contents of a Word Document Using OpenXML in C#

I am creating Word documents using my OpenXML library in my .net core 6.1 application. Everything is perfect and working smoothly. But after doing everything, I need to update table of contents but I ...
KaraKaplan's user avatar

1
2 3 4 5
75