openxml

Will Subversion efficiently store OpenXML Office documents?

戏子无情 提交于 2019-11-26 20:35:04
问题 I have been managing Subversion as an engineering document storage repository for my company. It is working fairly well, however I have a question about how MS Office 2007 formats are (should be) handled by Subversion. I'm looking at an Excel 2007 spreadsheet (extension .xlsx) in my working copy that Subversion has applied the svn:mime-type property application/octet-stream . This means that Subversion is treated it as binary, right? I was hoping that the new MS Office document formats would

What indicates an Office Open XML Cell contains a Date/Time value?

可紊 提交于 2019-11-26 19:46:33
I'm reading an .xlsx file using the Office Open XML SDK and am confused about reading Date/Time values. One of my spreadsheets has this markup (generated by Excel 2010) <x:row r="2" spans="1:22" xmlns:x="http://schemas.openxmlformats.org/spreadsheetml/2006/main"> <x:c r="A2" t="s"> <x:v>56</x:v> </x:c> <x:c r="B2" t="s"> <x:v>64</x:v> </x:c> . . . <x:c r="J2" s="9"> <x:v>17145</x:v> </x:c> Cell J2 has a date serial value in it and a style attribute s="9" . However, the Office Open XML Specification says that 9 corresponds to a followed hyperlink. This is a screen shot from page 4,999 of ECMA

Replace image in word doc using OpenXML

僤鯓⒐⒋嵵緔 提交于 2019-11-26 19:10:15
问题 Following on from my last question here OpenXML looks like it probably does exactly what I want, but the documentation is terrible. An hour of googling hasn't got me any closer to figuring out what I need to do. I have a word document. I want to add an image to that word document (using word) in such a way that I can then open the document in OpenXML and replace that image. Should be simple enough, yes? I'm assuming I should be able to give my image 'placeholder' an id of some sort and then

Export DataTable to Excel with Open Xml SDK in c#

你离开我真会死。 提交于 2019-11-26 18:37:21
Sorry for my english please. I'm new in open xml sdk. My program have ability to export some data and DataTable to Excel file (template) In the template I insert the data to some placeholders. It's works very good, but I need to insert a DataTable too... My sample code: using (Stream OutStream = new MemoryStream()) { // read teamplate using (var fileStream = File.OpenRead(templatePath)) fileStream.CopyTo(OutStream); // exporting Exporting(OutStream); // to start OutStream.Seek(0L, SeekOrigin.Begin); // out using (var resultFile = File.Create(resultPath)) OutStream.CopyTo(resultFile); Next

OpenXML tag search

流过昼夜 提交于 2019-11-26 17:59:15
I'm writing a .NET application that should read a .docx file nearby 200 pages long (trough DocumentFormat.OpenXML 2.5) to find all the occurences of certain tags that the document should contain. To be clear I'm not looking for OpenXML tags but rather tags that should be set into the document by the document writer as placeholder for values I need to fill up in a second stage. Such tags should be in the following format: <!TAG!> (where TAG can be an arbitrary sequence of characters). As I said I have to find all the occurences of such tags plus (if possibile) locating the 'page' where the tag

Export big amount of data from XLSX - OutOfMemoryException

余生长醉 提交于 2019-11-26 17:48:50
I am approaching to export a big amount of data (115.000 rows x 30 columnd) in Excel OpenXML Format (xlsx). I am using some libraries like DocumentFormat.OpenXML, ClosedXML, NPOI. With each of this, OutOfMemoryException is thrown because the representation of the sheet in the memory causes an exponential memory increase. Also closing the document file every 1000rows (and releasing memory), the next loading causes memory increase. Is there a more performant way to export data in xlsx without occupy a lot of memory? The OpenXML SDK is the right tool for this job but you need to be careful to use

OpenXml and Date format in Excel cell

半腔热情 提交于 2019-11-26 17:09:57
问题 I am trying to create an Excel file in xlsx format using OpenXML because I need to use that on a web server. I don’t have any problem to fill the values in the sheets; however I am struggling to set the classic Date format in a cell. Below a quick test using DocumentFormat.OpenXml and WindowsBase references. class Program { static void Main(string[] args) { BuildExel(@"C:\test.xlsx"); } public static void BuildExel(string fileName) { using (SpreadsheetDocument myWorkbook = SpreadsheetDocument

Using OpenXmlReader

孤者浪人 提交于 2019-11-26 16:27:34
问题 I hate to resort to StackOverflow for something so (seemingly) basic, but I've been fighting with Microsoft for the last few hours and seem to be hitting a dead end. I am trying to read (large) Excel 2007+ spreadsheets, and Google has kindly informed me that using the OpenXml SDK is a pretty popular choice. So I gave the thing a shot, read some tutorials, checked Microsoft's own library pages, and got very little out of them all. I am using a small test spreadsheet with just one column of

How can I embed any file type into Microsoft Word using OpenXml 2.0

爷,独闯天下 提交于 2019-11-26 16:19:10
问题 I spent a lot of time trying to figure out a good way to embed any file into Microsoft Word using OpenXml 2.0; Office documents are fairly easy but what about other file types such as PDF, TXT, GIF, JPG, HTML, etc.... What is a good way to get this to work for any file type, in C#? 回答1: Embedding Foreign Objects (PDF, TXT, GIF, etc…) into Microsoft Word using OpenXml 2.0 (Well, in collaboration with COM) I got a lot from this site, so here I asked and answered my own question in order to give

How can I search a word in a Word 2007 .docx file?

心已入冬 提交于 2019-11-26 15:50:55
I'd like to search a Word 2007 file (.docx) for a text string, e.g., "some special phrase" that could/would be found from a search within Word. Is there a way from Python to see the text? I have no interest in formatting - I just want to classify documents as having or not having "some special phrase". More exactly, a .docx document is a Zip archive in OpenXML format: you have first to uncompress it. I downloaded a sample (Google: some search term filetype:docx ) and after unzipping I found some folders. The word folder contains the document itself, in file document.xml . After reading your