06-19-06 12:23 PM
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/exce
l")
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
[ Post a follow-up to this message ]
|