if you need more advanced features:

http://www.carlosag.net/Tools/ExcelXmlWriter/Default.aspx


----- Original Message ----- 
From: <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Wednesday, November 23, 2005 5:00 PM
Subject: Re: [AspNetAnyQuestionIsOk] Reporting to Excel


> Here's some sample code that you can readily modify
>
> 1. in a web form, add an ASP:Table object
> 2. in the code behind, follow these steps
>
>     a. Response.Buffer = True
>     b. Response.ContentType = "application/vnd.ms-excel"
>     c. Dim x As Integer
>     d. Dim row As New TableRow
>     e. For x = 0 To 10
>     f.       Dim cell As New TableCell
>     g.       cell.Text = x.ToString
>     h.       row.Controls.Add(cell)
>     i.       Table1.Controls.Add(row)
>     j.   Next
>     k.   Response.Flush()
>
> You can add a new cell for each column in your datasource,
> then add that column to the row and finally add the row
> to the table.
>
> YOu may set the cssClass property of each cell (cell.cssClass)
> to properly draw borders around the cell.
>
> for example, in a style sheet add .cell { border: 1pt solid black;}
> and then set the cssClass="cell"
>
> Remember to add the link to the style sheet to the page header
>
> Dallas Martin
>
>
>
> Quoting Stephen Russell <[EMAIL PROTECTED]>:
>
>>
>>
>> I have a Web app for reporting that has used Crystal for .NET as it's 
>> only
>> tool for viewing data.
>>
>> I was just handed a project for creating audit workbooks in Excel.
>>
>> I can get the data fine and it will be in a ds.
>>
>> What is the best way to deliver the content back to the user for Excel? 
>> I
>> have a mixed bag of Excel versions, 2000, XP, 2003.
>>
>> I don't want to put Excel on the server.
>>
>> What options do I have?
>>
>> TIA
>>
>> Stephen Russell
>> DBA/Developer
>> Transaction Graphics Inc.
>>
>> Office: 901.312.7621
>> Fax: 901.312.7655
>>
>> [EMAIL PROTECTED]
>>
>>
>> This message is intended exclusively for the individual or entity to 
>> which it
>> is addressed.  This communication may contain information that is
>> proprietary, privileged or confidential or otherwise legally prohibited 
>> from
>> disclosure.  If you are not the named addressee, you are not authorized 
>> to
>> read, print, retain, copy or disseminate this message or any part of it. 
>> If
>> you have received this message in error, please notify the sender 
>> immediately
>> by e-mail and delete all copies of the message.
>>
>>
>> This message has been scanned by Modus Gate Anti-Virus/Spam technology.
>>
>>
>>
>>
>>
>> Yahoo! Groups Links
>>
>>
>>
>>
>>
>>
>
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
> 



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Get fast access to your favorite Yahoo! Groups. Make Yahoo! your home page
http://us.click.yahoo.com/dpRU5A/wUILAA/yQLSAA/saFolB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to