Все вопросы: [openxml]

74 вопросов

похожие теги: openxml-sdksql-server-openxml
7
голосов
2ответов
3231 просмотров

What is the difference between Office Automation, VSTO, and Open XML SDK?

What is the difference between Office Automation, VSTO, and Open XML SDK? Do we need all of them or some of them are obsolete?

2
голосов
5ответов
4521 просмотров

How to create a excel file with sheets in C#?

I want to create an excel file say personinfo.xls with one work sheet say Person. Is there a way in C# to do it ?

0
голосов
2ответов
1371 просмотров

How to exporting data from a List<t> to excel file?</t>

I have a List&lt;Person&gt; which is bound to a grid view. I want to export all the values to an excel file. My person class is as follows: class Person { public string Name { get; set; } public string City { get; set; } public int Age { get; set; } } Is there any way to do it? Ple...

1
голосов
1ответов
72 просмотров

OpemXML Namespaces

How do I get the namespaces of specific nodes in the OpenXML standard? Here is an example of using them: NameTable nt = new NameTable(); XmlNamespaceManager nsManager1 = new XmlNamespaceManager(nt); nsManager1.AddNamespace("a", "http://schemas.openxmlformats.org/drawingml/2006/main"); BUT I ...

14
голосов
2ответов
14820 просмотров

How to extract plain text from a DOCX file using the new OOXML support in Apache POI 3.5?

On September 28, 2009 the Apache POI project released version 3.5 which officially supports the OOXML formats introduced in Office 2007, like DOCX and XLSX. Please provide a code sample for extracting a DOCX file's content in plain text, ignoring any styles or formatting. I am asking this becau...

2
голосов
2ответов
6994 просмотров

OPENXML with xmlns:dt

Use OPENXML to get dt element in MSSQL 2005. How can I get xmlns:dt element in xml? For example, get a result set of two rows that list product id and country code. 121403 GBR 121403 USA declare @xmldata xml set @xmldata = '&lt;?xml version="1.0"?&gt; &lt;data xmlns="http://www...

1
голосов
1ответов
3503 просмотров

How to get parent element name using OpenXML in sqlserver

If I have some xml: &lt;Users&gt; &lt;User&gt; &lt;property1&gt;sdfd&lt;/property1&gt; ... &lt;User&gt; ... &lt;/Users&gt; And my sql is: SELECT * FROM OpenXML(@idoc, '/Users/User') WITH ( [property1] varchar(50) 'property1', ......

1
голосов
1ответов
564 просмотров

OpenXML - CellFormats - Do I really need to configure one for every single permutation?

I'm currently working with v2.0 of the SDK to generate an Excel workbook and it was all going well until I came to apply the cell formatting. I've created a few CellFormats and successfully applied them but there are a few more permutations that I need to configure: 4 fonts (normal, bold, ital...

3
голосов
1ответов
1062 просмотров

Different types of hyperlinks in Word document

I'm writing a small app the takes a path as input and then fetches every docx file in that path, replacing every hyperlink with a keyword. The strange thing is that I found two sorts of hyperlinks, the first one is from WordprocessingDocument ExternalRelationships and the other one is from findi...

17
голосов
4ответов
38190 просмотров

How to replace content in template docx document and Open XML SDK 2.0 (Aug 09)?

I have a "template" docx document which contains the desired layout, and wish to insert content using C#, but I cannot find a way to uniquely address specific sections of the document, such as paragraphs or tables. What is the best way to uniquely identify elements in the document? Thanks, Matt S...

1
голосов
4ответов
5984 просмотров

Microsoft Word Document Controls not accepting carriage returns

So, I have a Microsoft Word 2007 Document with several Plain Text Format (I have tried Rich Text Format as well) controls which accept input via XML. For carriage returns, I had the string being passed through XML containing "\r\n" when I wanted a carriage return, but the word document ignored ...

0
голосов
1ответов
533 просмотров

Returning Explicit Open XML results sets from a Table Value Function

I'm trying to return rows in Open XML form from a table value function in SQL Server (2008). I'm occasionally getting errors when I select the results with "for xml explicit" which suggest that the order of the results is not guaranteed to be the same as the order I insert into the output of the ...

0
голосов
1ответов
402 просмотров

Serializing Hashset contents to a SQL table

I have a hashset that I want to serialize to a SQL Server table. When serialized hashset looks like this... &lt;InstallerContactIds&gt; &lt;int&gt;153771&lt;/int&gt; &lt;int&gt;209572&lt;/int&gt; &lt;/InstallerContactIds&gt; I am using the following to insert the XML into the table......

21
голосов
4ответов
5716 просмотров

Will Subversion efficiently store OpenXML Office documents?

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 cop...

5
голосов
3ответов
1067 просмотров

How can I query a Word docx in an ASP.NET app?

I would like to upload a Word 2007 or greater docx file to my web server and convert the table of contents to a simple xml structure. Doing this on the desktop with traditional VBA seems like it would have been easy. Looking at the WordprocessingML XML data used to create the docx file is confu...

3
голосов
1ответов
3302 просмотров

adding images to openxml doc created from altchunk

I need an automated process for creating docx files from xhtml source. The xhtml files contain images (&lt;img&gt; elements) whose "src" attributes point to an external reference. But the docx files need to be readable without a network connection, so I need to find a way to embed the images dire...

2
голосов
1ответов
3197 просмотров

SQL, OPENXML and DateTime conversations

I've inherited a mass of stored procedures that take as their only parameter a block of XML, the author then cracks it (using OPENXML) and then updates the a row. I've come across a problem while updating a table that has datetime columns, the following is a snippet of data that currently fails: ...

0
голосов
1ответов
448 просмотров

opening .xlsx in office 2003

I have created a .xlsx using openxml. I am not able to open this file in office 2003.. I have also tried using compatibility pack but still the file does not open. What can be done if i need to generate .xlsx that can be opened in office 2003 as well. Code i am using to generate .xlsx is : publ...

2
голосов
1ответов
1161 просмотров

Embedding an OpenXML document within another OpenXml document

I have a need to gather a number of .docx files in a folder and "chain" them into a single document that will be displayed to the user. Now I've read Brian Jones' article but while it sounded promising I have encountered a problem. When I perform the actions manually using Word 2007 I end up wi...

1
голосов
1ответов
1667 просмотров

OPENXML Remote Scan Performance

I'm looking for some advice on OPENXML. Specifically, the performance. I am seeing very slow performance on a very small piece of XML. Something about this is causing a Remote Scan. Any ideas on how to go about tuning it? DECLARE @idoc int EXEC sp_xml_preparedocument @idoc OUTPUT, ...

10
голосов
4ответов
22944 просмотров

Saving an OpenXML Document (Word) generated from a template

I have a bit of code that will open a Word 2007 (docx) document and update the appropriate CustomXmlPart (thus updating the Content Controls in the document itself as they are mapped to the CustomXmlPart) but can't work out how to save this as a new file.! Surely it can't be that hard! My curren...

7
голосов
2ответов
2553 просмотров

XLSX- how to get rid of the default namespace prefix x:?

I'm generating XLSX spreadsheet using OOXML SDK, and I need to get rid of x: namespace prefix. How can I achieve this? using (SpreadsheetDocument doc = SpreadsheetDocument.Open("template.xlsx", true)) { //Save the shared string table part if (doc.Work...

1
голосов
1ответов
152 просмотров

Office Open XML: Relationship not used in the document

I have an Open Office XML document where a relationship that is defined in a relationship part is not used anywhere in the document, neither in the MainDocumentPart nor in any other part. Is this an invalid OpenXML Documment or not. Are unsues relationships allowed do the cause the document to be...

0
голосов
3ответов
694 просмотров

Using reflection with generic types and implicit conversions

I'm trying to use reflection to set properties on some OpenXML types (e.g. Justification). Assigning a value by enumerating all possibilities is straight-forward: // attr is an XmlAttribute, so .Name and .Value are Strings if (attr.Name == "Val") { if (element is Justification) { ...

10
голосов
6ответов
23794 просмотров

Duplicating Word document using OpenXml and C#

I am using Word and OpenXml to provide mail merge functionality in a C# ASP.NET web application: 1) A document is uploaded with a number of pre-defined strings for substitution. 2) Using the OpenXML SDK 2.0 I open the Word document, get the mainDocumentPart as a string and perform the substitut...

1
голосов
4ответов
10440 просмотров

Strange WCF Error - IIS hosted - context being aborted

I have a WCF service that does some document conversions and returns the document to the caller. When developing locally on my local dev server, the service is hosted on ASP.NET Development server, a console application invokes the operation and executes within seconds. When I host the service ...

2
голосов
1ответов
274 просмотров

Используйте System.IO.Packaging для FlatOPC

Я разрабатываю программу, в которой используются файлы FlatOPC. Мне нужно управлять несколькими частями файла. System.IO.Packaging предлагает классы ZipPackage и ZipPackagePart для управления файлами .docx. Для FlatOPC нет реализации. Итак, я построил свой собственный. Проблема в том, что исполь...

3
голосов
2ответов
4682 просмотров

Как получить текст из документа Word (docx) в C #?

Я пытаюсь получить простой текст из текстового документа. В частности, у меня проблемы с xpath. Как выбрать теги? Вот код, который у меня есть. public static string TextDump(Package package) { StringBuilder builder = new StringBuilder(); XmlDocument xmlDoc = new XmlDocument(); xm...

2
голосов
1ответов
1818 просмотров

Как открыть зашифрованный документ OOXML на C #?

Я хочу открыть зашифрованные файлы OOXML, которые хранятся в виде потоков внутри составного файла OLE. У Microsoft есть API для OOXML ( OOXML Format SDK 2.0 , но, похоже, у него нет возможности манипулировать зашифрованными документами OOXML. Итак, это разбивается на два вопроса. Как открыв...

1
голосов
1ответов
2625 просмотров

Не удается получить значение из openxml, если элемент имеет атрибут xmlns

Атрибут xmlns в следующем коде не позволяет мне получить нужное значение. Прекрасно работает с любым другим атрибутом, но не с xmlns. Я не могу контролировать предоставленный мне xml - как я могу получить значение CrpId? declare @CrpId int, @i int, @xml xml set @xml = '&lt;NewProgressReportR...