Last post Nov 02, 2009 03:20 AM by stanly
Oct 29, 2009 11:16 AM|antiflag|LINK
I'm having problem in exporting the data to the excel sheet...
can anyone please help me... i need the complete code...
and please tell me how to access the dataset if it is in another page so that i could export it to the excel sheet....and
there are buttons too which i don't need in my sheet...
Oct 29, 2009 04:59 PM|Mikesdotnetting|LINK
There are thousands of code samples just a Google away:
Oct 29, 2009 09:58 PM|antiflag|LINK
Thanks mike...but i couldn't find the one that can work in vb.net with a good formatting....
Oct 30, 2009 02:36 AM|Mikesdotnetting|LINK
Then run a C# sample through www.codechanger.com
Nov 02, 2009 02:15 AM|TarekHalaseh|LINK
There are a minimum 2 solutions for your case:
1. you can put your dataset or whatevere you are using inside a Session so you can use it in the other page.
2. you can create a class in the AppCode that its object can hold a dataset.
for the Excel Expoting you can do the following :
create an Html code for an HtmlTable with a StringBuilder in the the structure of the table put your data from the DataSet then next use the following code to write to Excel:
Response.Buffer = True
Response.Charset = ""
Response.ContentType = "application/vnd.ms-excel"
Nov 02, 2009 03:06 AM|oidldb|LINK
Here's an example that will export your data to the xlsx format without you having to install Excel on the server.
Hope this helps!
Nov 02, 2009 03:20 AM|stanly|LINK
try this link