openxml-sdk

Excel “Refresh All” with OpenXML

*爱你&永不变心* 提交于 2019-12-10 13:14:12
问题 I have an excel 2007 file (OpenXML format) with a connection to an xml file. This connection generates an excel table and pivot charts. I am trying to find a way with OpenXML SDK v2 to do the same as the "Refresh All" button in Excel. So that I could automatically update my file as soon as a new xml file is provided. Thank you. 回答1: You can't do this with Open XML. Open XML allows you to work with the data stored in the file and change the data and formulas and definitions and such. It doesn

OpenXML SDK C++ Examples

主宰稳场 提交于 2019-12-10 10:53:00
问题 HI, I'm trying to create a word document in C++ using OpenXML SDK, I'm facing problems in adding references and using namespace as most of the examples in the web are given based on C#. 1.How do I add references to project and also use namespaces(Ex - using namespace System.Xml;) in the code Also please suggest any C++ examples links for OpenXML SDK. Thanks in advance 回答1: I don't know of any for the SDK, but if you're looking for C++ in .NET and working with Open XML ( System.IO.Packaging ,

programaticaly embedding Font Family in .docx file

巧了我就是萌 提交于 2019-12-10 10:32:15
问题 I am trying to insert the font family (not system fonts) in the docx file. I am using openxml-sdk to achieve this functionality. Somehow I am able to get the font information from a particular docx file. But not able to embed the font family in the document Is it possible to embed the font in a docx file using code? 回答1: Yes, it trivial for docx. MS Word have check-box for that [http://www.howtogeek.com/howto/microsoft-office/embed-true-type-fonts-in-word-and-powerpoint-2007-documents/]. To

Read using OleDbConnection created xlsx file using Open xml SDk

冷暖自知 提交于 2019-12-10 06:39:47
问题 I created xlsx file using standarts of Open Xml SDK. While opening it in excel everything works perfect. My problem is that I cannot open that created file using OleDbConnection, but others not created xlsx file OleDB can open as well. Will be glad for any help. 来源: https://stackoverflow.com/questions/29428208/read-using-oledbconnection-created-xlsx-file-using-open-xml-sdk

Why does my custom XML not carry over to a new version of a DOCX file when Word saves it?

荒凉一梦 提交于 2019-12-10 03:52:08
问题 I'm adding in some custom XML to a docx for tracking it inside an application I'm writing. I've manually done it via opening the Word Document via a ZIP library, and via the official Open XML SDK route. Both have the same outcome of my XML being inserted into customXml folder in the document. The document opens fine in Word for both of these methods, and the XML is present. BUT when I then save the document as MyDoc2.docx for example all my XML disappears. What am I doing wrong? Microsoft

C# to replace strings of text in a docx

£可爱£侵袭症+ 提交于 2019-12-09 17:48:38
问题 Using C#, is there a good way to find and replace a text string in a docx file without having word installed on that machine? 回答1: Yes, using Open XML. Here's an article which addresses your specific question: Creating a Simple Search and Replace Utility for Word 2007 Open XML Format Documents 回答2: You may also try Aspose.Words for .NET in order to find and replace text in Word document. This component doesn't require MS Office to be installed. The API is quite simple and easy to use and

How to insert image into header of OpenXML Word document?

放肆的年华 提交于 2019-12-09 17:08:51
问题 My OpenXML Word document generation project requires text, tables, and images. But first, I need a document header with a logo (image) in it. I've used the Microsoft example for creating headers and footers at Generating Documents with Headers and Footers in Word 2007 by Using the Open XML SDK 2.0 for Microsoft Office, and text headers work just fine, but the images show up in the header with the broken image icon, a correctly sized border , and the message "This image cannot currently be

How to parse mathML in output of WordOpenXML?

心已入冬 提交于 2019-12-09 13:13:28
问题 I want to read only the xml used for generating equation, which i obtained by using Paragraph.Range.WordOpenXML . But the section used for the equation is not as per MathML which as i found that the Equation of microsoft is in MathML . Do I need to use some special converter to get desired xmls or are there any other methods? 回答1: You could use the OMML2MML.XSL file (located under %ProgramFiles%\Microsoft Office\Office15 ) to transform Microsoft Office MathML (equations) included in a word

OpenXML SDK Spreadsheet starter kits

大憨熊 提交于 2019-12-09 05:20:14
问题 I am trying to start working with Excel documents through the OpenXML SDK Spreadsheet API. But I haven't found any good guides or even examples on how to create a xlsx file from scratch. Only how to open an existing document and modify it. I have been thinking on having a empty template document and make a copy of it an then begin my proccessing on it. But it doesent feel right. It might be easier but I not comfortable using a technique I dont feel that I understand "pretty" good at least. So

Can I use the Open XML SDK in Mono?

假装没事ソ 提交于 2019-12-08 15:46:35
问题 Can the Open XML SDK be used in Mono? 回答1: Edit: It seems to be working in the meantime: https://stackoverflow.com/a/28322467/743897 Today (somewhere in 2011) I played around with the SDK and Mono 2.6. First I checked what MoMA thinks of the dll: 4 different Methods in DocumentFormat.OpenXml.dll need the following method from Mono which is not available. At least according to MoMA. void XmlReaderSettings.set_MaxCharactersInDocument (Int64) But I was brave and tried to do stuff. The bad thing: