IIS ASP - Export Excel Report from ASP Output (Dynamic Stage)

This is Interesting: Free IT Magazines  
Home > Archive > IIS ASP > June 2006 > Export Excel Report from ASP Output (Dynamic Stage)





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Export Excel Report from ASP Output (Dynamic Stage)
shankumar

2006-06-19, 1:22 am

Hai Evrybody,

I have one problem, that is i design a ASP report getting data from MS
SQL Server 2000 and displays it as a desinged format and also "one
option to export this same format to MS EXCEL". Before i seen it, but i
dont know its code. pls anybody tell or sent the its codings pls


my Mail Id :

skumar@jeevaninfotech.com
shankumaran1983@yahoo.com

pls pls pls pls pls pls
pls pls pls
pls pls pls

visu

2006-06-19, 7:23 am

shankumar wrote:
> Hai Evrybody,
>
> I have one problem, that is i design a ASP report getting data from MS
> SQL Server 2000 and displays it as a desinged format and also "one
> option to export this same format to MS EXCEL". Before i seen it, but i
> dont know its code. pls anybody tell or sent the its codings pls
>
>
> my Mail Id :
>
> skumar@jeevaninfotech.com
> shankumaran1983@yahoo.com
>
> pls pls pls pls pls pls
> pls pls pls
> pls pls pls



<%
Response.AddHeader("Content-type","application/x-msdownload;application/excel")
Response.AddHeader("Content-Disposition","attachment;filename=filename.xls")
%>

use above lines for outputing data in excel format..
the above two line makes the browser to open a window to ask for save
or open an excel file..
then u concatenate ur table values to the structure what i gave below.
<%

strData="<table><tr><td>v1</td><td>v2</td><td>v3</td><td>v4</td><td>v5</td></table>"

response.write strData

%>
here v1 , v2 are values of a field of table

hope this will help u..

visu

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com