CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 export grid to excel

Print topic Send  topic

Author Message
densma
Posted: 02/24/2004, 8:53 AM

how can i put like export button or link to export mygrid page to excel?
on asp with template
DonB
Posted: 02/24/2004, 9:57 AM

Take a look at the downloads area of my website. I have some code there
that shows you how to export data to "csv" format. By changing the
ContentType of the output stream, you can instruct the browser to open it in
Excel (or other CSV-aware application) or save it to a file. You could even
display the raw text in the browser.

For information on ContentTypes, refer to:
http://www.gotodon.com/ccbth/Features/Kbase.asp?find=type

--
DonB

http://www.gotodon.com/ccbth


"densma" <densma@forum.codecharge> wrote in message
news:6403b8176ddfca@news.codecharge.com...
> how can i put like export button or link to export mygrid page to excel?
> on asp with template
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>

densma
Posted: 02/24/2004, 10:50 AM

so this just export from data source ?
i have like search on the page, if data is filter i will like the ability to export the result output not everything. not sure if that how this script works.
i would prefer a column with a on click event
how can i do this?
Robert Rodgers
Posted: 02/24/2004, 12:08 PM


You could try.

http://www.sylvancomputing.com/ccs/

I have written a class that exports the grid record object.

rob
"densma" <densma@forum.codecharge> wrote in messagenews:6403b8176ddfca@news.codecharge.com...
> how can i put like export button or link to export mygrid page to excel?
> on asp with template
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>

densma
Posted: 02/24/2004, 12:57 PM

hey Robert
do you have instructions?
how can i add a button like that in my grid page.(already created)
your column seem to be re-arrange on export
Robert Rodgers
Posted: 02/25/2004, 7:15 AM

>>do you have instructions?
No no instructions.

>>how can i add a button like that in my grid page.(already created)
Look in the source html. The button is just a ccs button control. I put a form tag around with the action = the current
page. There is an event on the button so besure to add one for your page also so when the action ocurres, the proper url
parameters are passed to the page.


>>your column seem to be re-arrange on export
However they occur in the sql query is how they get exported. If you want them in a certain order then reorder them in your
sql statement. All it does is loop through the recordset for the grid, for each record it loops through the fields.

I can think of a couple of ways to allow the users to select the order to export if they want it different than the sql
order. I am not sure if I can pick it up automaticly from the grid though. I will have to look at the properties and
methods exposed in the grid object. I won't have anytime for this until next week, as I have too much work and not enough
hours as it is<G>

Thanks
Rob

<--- Code example
For Each F in objRecordSet.Fields
xStringOut = xStringOut & RemoveFormatting(f.value) & lTextDelim & lFieldSep & lTextDelim
Next
-->>




"densma" <densma@forum.codecharge> wrote in messagenews:6403bbaa097680@news.codecharge.com...
> hey Robert
> do you have instructions?
> how can i add a button like that in my grid page.(already created)
> your column seem to be re-arrange on export
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>


Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.