openxml sdk - Godaddy with Open XML SDK

I am trying to load the Open XML SDK library in my webpage on Godaddy.I am not able to load the dll properly.I asked the technical support, but all they said is create a folder in their IIS setting and something about "ASP.NET application DLLs" which I don't get.I think this library should be ok since it just manipulates XML files.The error I'm getting is:CS0246: The type or namespace name 'DocumentFormat' could not be found (are you missing a using directive or an assembly reference?)...Read more

openxml sdk - Comparing Docx files using OOXML

How can I read word-by-word (with styles) from a docx file. I want to compare two docx files word-by-word and based on the differences I have to write into another docx file (using c# and OOXML).I have tried achieving this by using DocumentFormat.OpenXml.Extensions.dll, OpenXMLdiff.dll and ICSharpCode.SharpZipLib.dll but nothing is giving me the option to read word-by-word(ICSharpCode.SharpZipLib does give word-by-word but it will not give style associated with that word).Any help on this will be very useful....Read more

openxml sdk - Open XML SDK: opening a Word template and saving to a different file-name

This one very simple thing I can't find the right technique. What I want is to open a .dotx template, make some changes and save as the same name but .docx extension. I can save a WordprocessingDocument but only to the place it's loaded from. I've tried manually constructing a new document using the WordprocessingDocument with changes made but nothing's worked so far, I tried MainDocumentPart.Document.WriteTo(XmlWriter.Create(targetPath)); and just got an empty file.What's the right way here? Is a .dotx file special at all or just another docum...Read more

Issue about openXML SDK

I have a picture and I want to put it in the excel cell (so that left upper corner picture lays on left upper corner cell) with specific coordinate. But I haven't got absolute cell coordinate. I have known excel's coordinate (for example G120) only.I have tried calculate absolute coordinate through other cell, but I have got significant error.How do I calculate exactly absolute coordinate through Excel's coordinate?Thanx in advance for the helping hand....Read more

Word Document creation using OpenXML

We are creating word document using openxml programatically. Everything works fine but when we protect the document also programactially using openxml for editing then contents of the document are getting affected for example the sentence نحاول اصلاح التقرير اليوم وشكرا will become اليوم وشكرا نحاول اصلاح التقريرIf the generated document is not protected then everything stays fine. Any help would appreciated.Thanks in advance.The code we are using to protec the document is using (WordprocessingDocument wdoc = WordprocessingDocument.Open...Read more

openxml sdk - Create/Write Spreadsheet/Excel - How to loop EF Model/Table by row then cloumn without coulmn name

I am trying to create a generic method to export database tables to excel using Entity Framework and the Open XML SDK. I have the Open XML SDK code/method worked out, however when writing the data to XML I need to loop through each row by column. The challenge is (which usually is a benefit) the strongly typed column names. I can't figure out how to loop through each column of any table/model passed to the method. I tried Reflection getting the property names, however this returns more than just the actual table columns e.g. it also returns Nav...Read more

openxml sdk - OOXML : keep images displayed after moving the header content to to the body

I am using open XML SDK and I want to move the content of content control (containing images) from the header to the body, the problem that images does not show after moving. After copying the content control content I am adding the image parts in this way :foreach (var headerPart in wordDocument.MainDocumentPart.HeaderParts) { SdtBlock sdtToSave = this.FindSdtBlock(contentControlTag, headerPart ); if (sdtToSave != null) { ...Read more

How to place a dynamic table in openXml wordprocessing document?

Using an OpenXml document, there are content controls where the data gets added based on the data from the database for that record; but now? Need to add a dynamic Table where it could have from 1 to 10 rows. always has 5 columns.Getting the data to put in is easy, they will be driven by variables. so they can be named Row 1 column 1, col 2, col3, col4 and col5; I can make variables to say useRow1 (to 10) = true/false; these are the #using defines: using DocumentFormat.OpenXml; using DocumentFormat.OpenXml.Packaging; using DocumentF...Read more

openxml sdk - I can't update a specific slide and I get a "Powerpoint content error"

I have a excel sheet with one chart which is the source. My target is a powerpoint presentation with 3 slides. I need to update slide #3 with the Chart in the excel file. After executing the application and when I try to open the pptx file I get a "Powerpoint found a problem with content". After I repair I notice that I always get a blank slide in Slide #2 which shows I am not updating the correct slide. What should I do to go to the slide based on slide no. (I don't have chart titles in the powerpoint slide and the excel chart) and why am I ge...Read more

openxml sdk - What exactly does the Open XML SDK v2 take care of that you would have to do manually when coding by hand with an XML library?

This is closely related to another question I asked: Is there functionality that is NOT exposed in the Open XML SDK v2?I am currently working with Open XML files manually. I recently had a look at the SDK and was surprised to find that it looked pretty low level, quite similar in fact to the helper classes I have created myself. My question is what exactly does the SDK v2 take care of that you would have to do manually when coding by hand with an XML library?For example, would it automatically patch the _rels files when deleting a PowerPoint sl...Read more

openxml sdk - Adding Custom Heading to Word Document

I am trying to add custom headings to a Word Document using the Office Open XML SDK. I want to inherit the default Heading1 style but for some reason the code below creates a styles.xml file from scratch and only contains my new styles.I want the generated styles.xml to also contain the default styles (Normal, Heading1, Heading2, Heading3,...). What should I do?Here is my code: using (var package = WordprocessingDocument.Create(tempPath, WordprocessingDocumentType.Document)) { // Add a new main document part. ...Read more