Solved

Tables in word document Open XML

Posted on 2009-04-08
2
744 Views
Last Modified: 2013-11-10
Hi folks, I have been spinning my wheels for a couple of days on an issue with server side open xml code. I have a word template that I want to fill, with a general information part, and a table below. The general information part I was able to populate using content controls and it works fine. The problem I am having is with the table, it is dynamically generated based on a dataset, I'm not sure what to use to create the table, should i use content controls? create the table from scratch, try to find the table in the template and modify it? any one has exprience with this? I'd greatly appreciate any help in the mater.

Thanks
Z
0
Comment
Question by:zaidmarji
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 19

Expert Comment

by:daveamour
ID: 24106799
I created xml word docs once.
I created the template layout manually so it was just as I wanted then saved that as xml.
Then I grabbed data from a DataSet using GetXml() Then used XSLT to combien the two.
Pretty easy and worked very well.
0
 

Accepted Solution

by:
zaidmarji earned 0 total points
ID: 24163468
Thanks Dave,

The data i wanted to display was all dynamic, so i couldnt have anything preset, I found the blog below, which even if you cannot understand the language, the code is well written and does the trick. I've expanded it and created my own class that not only creates the table that from the dataset, it also can append new single rows as needed.

http://www.cnblogs.com/duhongyu216/articles/1366855.htmlhttp://www.cnblogs.com/duhongyu216/articles/1366855.html
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
In this video, we show how to convert an image-only PDF file into a PDF Searchable Image file, that is, a file with both the image (typically from scanning) and text, which is created in an automated fashion with Optical Character Recognition (OCR) …
This Experts Exchange video Micro Tutorial shows how to tell Microsoft Office that a word is NOT spelled correctly. Microsoft Office has a built-in, main dictionary that is shared by Office apps, including Excel, Outlook, PowerPoint, and Word. When …

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question