Im Using Infragistice 11.2 Asp.net 3.5 c#
Can anyone provide sample code for code behind page to export data from a Sql Server dataset to a Table in an MSword document. Or is there a better way to do this?
Thanks
Hi bridsimon,
Is this issue a workaround you are looking into for the issue we are working through in this thread? If so, I would like to focus this on the other thread.
Please let me know if you have any questions with this.
Hi Actually ideally I would like sample code for code behind page to export data from a Sql Server dataset to a Table in an MSword document using Infragistics library! I working in Visual studios 2008 Infragistics 11.2.20112.2176 and c#
The thread above is actually a work around to this issue! I could not find any help anywhere on exporting data from a dataset to a table in word. The closests thing to it was the thread above on exporting a webdata grid to a table in word.
Any example code would be very gratefully recieved.
Thanks Michael!
Brid
Hi Brid,
You can find some information and code samples on how to create a table in a Word document in our documentation here:
http://help.infragistics.com/NetAdvantage/ASPNET/2012.2/CLR4.0/?page=Word_Add_Table_to_Word_Document.html
You can extract the data from your Sql dataset and format it into the table.
Please let me know if you need further assistance with this and I'll be glad to help.
Hi Thanks Michael
Can you provide some sample code to extract the data from an Sql dataset and format it into a table in word.
Regards.
Brid Simon
I'm checking in to see if you need any further assistance with this issue. Please let me know if I can help you further.
If you are using a datasource provided by Infragistics, I would be glad to assist you further with extracting the data from it. Otherwise, we don't provide support for that and I would recommend using MSDN and Google for some more information.
Once you have the data extracted, when placing it into the table you would want to focus on this method from the previous documentation:
docWriter.AddTextRun(sql data here);
You can find further help on our Word library in our documentation here:
http://help.infragistics.com/NetAdvantage/ASPNET/current/CLR4.0/?page=Word_Infragistics_Word_Library.html
If you have any further questions related to our Word library, please let me know.