473,324 Members | 2,196 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Export Data to .CSV file

JP
Hi,

I want to export data to a .csv file in a way that a "Save
Dialog" opens up and allows users to select the File Path
and the File Name to save.

How do I do this?

Thank You,
JP

Nov 17 '05 #1
3 12014
JP,

To create the .csv file, use File IO to write a comma delimited file from a
data reader.

Then, create a hyperlink to this file dynamically. When the user clicks on
the link, it will ask them if they want to Open / Save it, just like any
other file download on the internet.

Good luck

Mark
www.dovetaildatabases.com

"JP" <jp*****@hotmail.com> wrote in message
news:4b****************************@phx.gbl...
Hi,

I want to export data to a .csv file in a way that a "Save
Dialog" opens up and allows users to select the File Path
and the File Name to save.

How do I do this?

Thank You,
JP

Nov 17 '05 #2
Also, if you do not want the extra step of having your users click on a
link, you could do a Response.WriteFile() and have the save as dialog open
automatically.

HTH,

Bill

"Mark" <fi**************@umn.edu> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
JP,

To create the .csv file, use File IO to write a comma delimited file from a data reader.

Then, create a hyperlink to this file dynamically. When the user clicks on the link, it will ask them if they want to Open / Save it, just like any
other file download on the internet.

Good luck

Mark
www.dovetaildatabases.com

"JP" <jp*****@hotmail.com> wrote in message
news:4b****************************@phx.gbl...
Hi,

I want to export data to a .csv file in a way that a "Save
Dialog" opens up and allows users to select the File Path
and the File Name to save.

How do I do this?

Thank You,
JP


Nov 17 '05 #3
btw, if you don't have Write access to the hard drive, you could just create
an in-memory byte array of the CSV and then just write it to the output
stream.

This would mean the CSV is generated on every request, but if it is unique,
it may not matter.

hth,
Dave
www.aspNetEmail.com

"Bill Priess" <no*****@nospam.com> wrote in message
news:uj**************@TK2MSFTNGP10.phx.gbl...
Also, if you do not want the extra step of having your users click on a
link, you could do a Response.WriteFile() and have the save as dialog open
automatically.

HTH,

Bill

"Mark" <fi**************@umn.edu> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
JP,

To create the .csv file, use File IO to write a comma delimited file
from a
data reader.

Then, create a hyperlink to this file dynamically. When the user clicks

on
the link, it will ask them if they want to Open / Save it, just like any
other file download on the internet.

Good luck

Mark
www.dovetaildatabases.com

"JP" <jp*****@hotmail.com> wrote in message
news:4b****************************@phx.gbl...
Hi,

I want to export data to a .csv file in a way that a "Save
Dialog" opens up and allows users to select the File Path
and the File Name to save.

How do I do this?

Thank You,
JP



Nov 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: atse | last post by:
Hi experts, I retrieve data from the database and display on ASP, then I export these data to a file, like Excel (the best) or text file. Is it possible? I think it is possible, but how can I do...
0
by: Shawn Mehaffie | last post by:
I have the following class that I've wirtten to take a Dataset and automatically export it to either XML, ASCII or Tab delimited file. The reason I wrote it they way I did was that I don't want to...
1
by: Matt | last post by:
I have an ASP page that calls ASP routines that I created that execute a database query and return the results to a recordset. I then iterate through the recordset and display the data in a table....
1
by: Do Park via SQLMonster.com | last post by:
Hello all, I don?t often export data from a table. I am wondering how you export data from a table. I?d like to know how you export in real world. Do you export data from a table to a flat...
6
by: maricel | last post by:
Is there anybody out there who have any idea why EXPORT is relatively slower when putting the output file on a network drive - map drive from onother PC compared to putting it on my local PC drive...
0
by: Shawn Mehaffie | last post by:
I have the following class that I've wirtten to take a Dataset and automatically export it to either XML, ASCII or Tab delimited file. The reason I wrote it they way I did was that I don't want to...
1
by: chaitu | last post by:
Hi, Can anybody tell me what the error code for Export is. Like i get the message SQL3104N The Export utility is beginning to export data to file...
2
by: mike_dba | last post by:
I am attempting to move data between 2 DB2 Linux databases using a pipe. I can't seem to get it working. Any assistance is appreciated. I first issue: mkfifo -m777 mypipe db2 "connect to...
1
by: smaczylo | last post by:
Hello, I've recently been asked to work with Microsoft Access, and while I feel quite comfortable with Excel, I'm at a complete loss with databases. If someone could help me with this issue I'm...
5
by: bhodgins | last post by:
Hi, I am new on here, and had a newbie question that I am stumped with. I am not new to access, but am new to VB. I am trying to export BLOBs from a field called photo to external jpeg files. I...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.