convert xml data to word

Posted by Alok under ASP.NET on 4/18/2011 | Points: 10 | Views : 2118 | Status : [Member] | Replies : 5
i have data from gridview into xml file as...
<?xml version="1.0" standalone="yes"?>
<NewDataSet>

<Table1>
<srno>1</srno>
<filename>resume S.doc</filename>
<date>25-05-2011</date>
</Table1>
<Table1>
<srno>3</srno>
<filename>as.doc</filename>
<date>25-05-2011</date>
</Table1>
<Table1>
<srno>4</srno>
<filename>dd.docx</filename>
<date>25-05-2011</date>
</Table1>
<Table1>
<srno>5</srno>
<filename>sss.doc</filename>
<date>25-05-2011</date>
</Table1>
<Table1>
<srno>6</srno>
<filename>ggg.doc</filename>
<date>25-05-2011</date>
</Table1>
<Table1>
<srno>7</srno>
<filename>hhh.gov</filename>
<date>25-05-2011</date>
</Table1>
</NewDataSet>


i want to convert this xml data into WORD format so that data will be shown just like data in gridview..
Plz Reply..
Thanks..

Thanks & Regards,
Alokssm



Responses

Posted by: Ndebata on: 4/18/2011 [Member] Starter | Points: 25

Up
0
Down
Hi Alok,

Microsoft reportviewer 10 support WORD rendering.
What you can try, you can create a ssrs local report and use your xml data to bind them as the datasource to the report.
The from the code behind render the report to word.


Thanks,
Debata


Alok, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Alok on: 4/18/2011 [Member] Starter | Points: 25

Up
0
Down
plz rply some easy respose..

Thanks & Regards,
Alokssm

Alok, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Ndebata on: 4/18/2011 [Member] Starter | Points: 25

Up
0
Down
Hi Alok,

Please take a look at it. First you can bind your xml data in to a gridview, then you can export it.
http://www.dotnetfunda.com/articles/article1150-all-in-one-export-data-in-aspnet-gridview-to-doc-gridview-to-excel-gr-.aspx

Incase if you want to know how to bind your xml in a gridview please reply.

Thanks,
Debata

Alok, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Ndebata on: 4/18/2011 [Member] Starter | Points: 25

Up
0
Down
Hi Alok,

You can bind your xml to the GridView in the following way.
DataSet ds = new DataSet();

ds.ReadXml(Server.MapPath(@"Your XML File Path"));

GridView1.DataSource = ds.Tables[0];
GridView1.DataBind();


Thanks,
Debata

Alok, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Alok on: 4/18/2011 [Member] Starter | Points: 25

Up
0
Down
Actually i want to save my gridview data into root folder..
gridview data can be save directly to root directory into xml format which is not possible in case of doc (word) format ..
so i first convert this gridview data into xml and then i want that xml data to be converted into word..which show data as in gridview..
i want to do whole task just by SINGLE Button CLICK..



Thanks & Regards,
Alokssm

Alok, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response