Creating a word document
-
Hi folks, I'm looking for a little advice. I am coming towards the final stages of my project (programmed in C#) and need to generate a word document from the data I have collected. This data is held in a dataset at present. The old version of the software used bookmarks as placeholders and macros to tidy everything up. We have been looking into the xml technologies - but I am having some difficulty understanding and implementing this. What I wish to do is have a template that I can merge with the data. Over the last few days I have looked at xml-fo/xslt and wordML but do not know what approach is best. The document itself is several pages long, some paragraphs are taken from the datasource and I need to insert some table data and images in other sections. Does anyone have experience of the above, if so can you please give me some pointers and references to get me started. All help is greatly appreciated Regards Darren Sim
-
Hi folks, I'm looking for a little advice. I am coming towards the final stages of my project (programmed in C#) and need to generate a word document from the data I have collected. This data is held in a dataset at present. The old version of the software used bookmarks as placeholders and macros to tidy everything up. We have been looking into the xml technologies - but I am having some difficulty understanding and implementing this. What I wish to do is have a template that I can merge with the data. Over the last few days I have looked at xml-fo/xslt and wordML but do not know what approach is best. The document itself is several pages long, some paragraphs are taken from the datasource and I need to insert some table data and images in other sections. Does anyone have experience of the above, if so can you please give me some pointers and references to get me started. All help is greatly appreciated Regards Darren Sim
-
I did something similar to this. I used RTF to construct the a text file. Bit simple but it worked for me. I was able to draw tables, fill them in and add text.
Thanks for the reply, I looked into doing this, however there will be several different styles of reports - with more to be added by the user and writing a class to generate each in rtf would not really be an option. I have been looking to create some template documents that can then be filled from the data layer. The xml/xsl route seems to cover what I need by creating the stylesheet and then merging that with the dataset. However, I am not very experienced with this and there seem to be many different approaches to doing this. Regards Darren