I am strugling with Open XML SDK and embedding pdf files into a docx file.
I do not want to use automation
I am able to create *.bin files from everything except from *.pdf (see this question)
Anyone has experience with this? From what I've gathered you must create a *.bin file in order to embedd any file into Word *.docx document (except images). Is that correct?
If you can't find a pure C# solution, you could consider the commercial product docx4j OLE Helper IKVM'd.
Disclosure: I wrote it.
The reason for pdf not working was in fact in acrobat reader.
When Ive installed older version (or did not have AR installed at all), it started to work.
Related
When using NPOI WorkbookFactory with a "modern" Excel file (*.xlsx) it produces an XSSFWorkbook, which contains the Excel-version:
xssfWorkbook.GetProperties().ExtendedProperties.AppVersion
This returns the Excel version number, e.g. "16.0300".
Is there a way to get this information for a HSSFWorkbook?
BTW: The name of the application is available in both classes:
hssfWorkbook.SummaryInformation.ApplicationName
xssfWorkbook.GetProperties().ExtendedProperties.Application
For MS Excel, this is "Microsoft Excel" in both cases.
But I couldn't find any kind of version information for HSSF.
Usecase: I get a lot of files from different sources and for support questions, it would be very helpful to know the Excel version a particular source uses. As you can also save a .xlsx as .xls, the BIFF version alone would not be of much help.
I have an application that download docx file from a service.
The problem is that the service creates the docx with the an old format (I think it used the open xml version 2.0).
I don't own the service so I can't change the creation process of the word , but I thought about building a convertor , that will open the downloaded files and recreate them in the newest format using the open xml sdk version 2.5.
I was optimistic when I thought this code will work ( A simple open and save) :
WordprocessingDocument wordprocessingDocument =
WordprocessingDocument.Open(filePath, true);
wordprocessingDocument.MainDocumentPart.Document.Save();
I'm not fimiliar with the open xml sdk , so any help will be appreciated.
You're just opening the doc and saving it with no changes. You need to change the Word version, then save it. This article should provide the info you need: http://blogs.msmvps.com/wordmeister/2013/01/18/openxmlsdk-word-compatibility-mode/
I'm developping a tool to manage some documents with versioncontrol. I have a windows client who is comparing 2 documents (previous version with current version) to see the differences between both documents. That is working fine (i'm using the interop dll's of microsoft).
I also have a web client where i want to do the same thing, but i don't want to install office on the server.
In my web client i only alow openxml files (docx, xlsx) because i can read and update versiondate in the document without having office installed.
Is there some tool where i can compare 2 openxml files with and show differences in a new document? (i already searched on it and there is some tool openxmldiff, but the results i get are some xml files and don't know how to combine them in a new document.
Any help?
You may want to take a look at OpenXml Powertools:
http://powertools.codeplex.com/
It has a DocumentComparer Class.
At least it is maybe a starting point.
The Open XML SDK 2.0 Productivity tool has a compare files option that will diff the two open xml files and show you the differences.
My task is to extract information from ppt file and compare with another ppt file. I have to use windows platform so i used excel and powerpoint's COM object.
After developing and testing the code in my computer when i exported the file into another computer it just failed. I started to debug in that file, and surprisingly debug was successful from first to last but as soon as click on the executable it fails.
I am totally *ucked up now cause inspite of updating excel dll files into those computers (which will serve the com support) it's not working. In every pc it gives different error message. I don't wanna work COM object anymore. It *ucks.
Can anyone suggest me any open source alternative in which i can read and extract information from Excel and Powerpoint files (both 2003 and 2007 format) ???
My preferred language is c# ........I got an paid solution (aspose) but i don't wanna go for that.
Any help will be appreciated. Just suggest me how can i deal with office files assuming ms office is not installed in my computer.
NPOI works well for Excel; I only know to use the built in, MS object library for PPT files.
has anyone tried to insert pdf document into word using open xml sdk 2.0 ?
Thank You!
With the SDK there is a tool called DocumentReflector (in folder C:\Program Files\Open XML Format SDK\V2.0\tools). This tool opens an existing OpenXML document and generates the code that will produce this document.
Now you can create a simple document in Word with an embedded PDF and open this document using DocumentReflector. The code generated can then be a base for your document creation process.