Questions tagged [openxml-powertools]

37 questions
1
vote
1 answer

How to Obtain a Byte Array or Stream from a PresentationDocument object

I have Open Office XML code that slices and dices PowerPoint files. Due to the nature of the Open XML SDK, much of this code reads to and writes from files on the file system. The goal is to eliminate these temporary files completely, and replace…
Robert Harvey
  • 178,213
  • 47
  • 333
  • 501
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
1 answer

Accept Insertion and reject deletion openxml

I need to compare two Word files and merge all insertions into a third one. I have managed to do that with OpenXML-Power-Tools and WmlCompare, but how do I reject only deletions? Accepting insertions is easy with OpenXmlPowerTools.RevisionAccepter…
knile
  • 318
  • 3
  • 15
1
vote
1 answer

How can I make my bullets larger in Open XML?

I'm generating docx files using the Open XML SDK for .NET The bullets in my lists are super tiny but I can't figure out why. So here's what I've done: Generating a doc with a single bulleted item Created a doc from Word with a single bulleted…
user1447679
  • 3,076
  • 7
  • 32
  • 69
1
vote
1 answer

Can I use OpenXmlPowerTools in a Flask App

Is it possible to use a C#/.Net based library like OpenXmlPowerTools in a Flask/Python 3 web-app? My research tells me that I might be able to via a wrapper? or creating a microservice? Would like to know your thoughts.
Boosted_d16
  • 13,340
  • 35
  • 98
  • 158
0
votes
0 answers

How can I read and change a string and save in Microsoft Word using OpenXmlPowerTools

I'm using OpenXmlPowerTools to merge several report template Microsoft Word. var sources = new List(); foreach (var fileName in fileName_List) { using (FileStream stream = System.IO.File.Open(filename, FileMode.Open)) …
0
votes
0 answers

C# : OpenXML "Remove" empty rows from excel

I have a sample.xlsx file generated by a program(of which I have no control) with data spanning across 200 rows. However, the file has another 1800 "trailing" empty rows(as shown in image) saved into it making it a total of 2000 rows. ie, if I read…
Sid133
  • 354
  • 2
  • 17
0
votes
0 answers

Open-Xml-PowerTools Document Builder - Build Document Performance Issue

I am using Powertools (Open-Xml-PowerTools Version 4.4.0) -> DocumentBuilder -> BuildDocument to merge multiple Docx files into a single file. Below is the scenario:- Merging 140 Docx files into a single document. File size ranging from 60 to 350…
uvcreation
  • 91
  • 1
  • 9
0
votes
0 answers

How to convert a WordprocessingDocument to a byte[]?

I have a WordprocessingDocument that I clone into a new object using the following function: private static WordprocessingDocument CloneWordprocessingDocument(string docPath) { using (var fileStream = new FileStream(docPath, FileMode.Open,…
0
votes
1 answer

OpenXML Copy Everything from two Docx templates into a single Docx File C#

We have two Docx files, one having the header templates(Letter Head) with Header and Footer parts and the title and the second file have the body. We need to combine both the Docx files into a single Docx File. Is it possible to copy all the…
0
votes
1 answer

How to export a complex element in a doc showing just a property and keeping all other information?

I need to import and export some documents from my web app written in .net-core to docx and viceversa: the users should be able to export, modify offline, and import back. Currently I am using OpenXml-PowerTools to export. The problem is that there…
deck80
  • 21
  • 4
0
votes
2 answers

System.Drawing support with lambda container images

I was trying to add System.Drawing library inside a lambda function using container image. Followed the AWS documentation here Added RUN yum install -y amazon-linux-extras RUN amazon-linux-extras install epel -y RUN yum install -y libgdiplus …
0
votes
1 answer

OpenXML and C# default font of a docx file is in Times New Roman

I have wrote some code in C# using .NET 5.0 with Nuget package openXML tools and for some reason when I merge the files together the font it merges itself in changes into Times New Roman on its own when the documents before merging were in calibri.…
Kevin Liu
  • 27
  • 3
0
votes
0 answers

How to set up Open-XML-PowerTools

I'm trying to use Open-XML-PowerTools. And I would like to execute it on powershell command line. However, I haven't got to the point where I can actually use it, because it seems that I could not have done the setup properly. So could you give me…
0
votes
0 answers

OpenXML Changing Default Track Changes Settings

I'm working with OpenXML, specifically tracking changes with a word document. I'd like to change the color of an insertion; however, I can't figure out how to access the insertion color settings using OpenXML or OpenXMLPowerTools. Normally, within…