Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 9 of 9
  1. #1
    New Coder
    Join Date
    Jun 2002
    Posts
    64
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Lightbulb Saving/Exporting Database Data To File

    Is it possible to save/export data via a webpage when using MS Access?

    Senario...

    Person comes to the site does a search/query on the db for whatever and when the results are shown the person wants to save/export the info to/as an excel file.

    I know it is possible to view a clients drive while they are on your page and I think it's also possible to save various files to the drive as well, but how would it be saved as something?

    If anyone knows of a tool or web pluggin or some code or anything that would be easy to set up for this kind of thing can you please let me know what the code is or where I can get the pluggins?

    Thanks,
    Larry

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Location
    Cincinnati, OH
    Posts
    545
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I have done this by looping through the recordset creating an csv file, then I allow a user to download the csv file. The csv file automatically opens in excel. If you want the code let me know.

  • #3
    New Coder
    Join Date
    Jun 2002
    Posts
    64
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Yes would you please, anythig would be great, post it here or send me an e-mail it's in my member info but just incase it's

    ldiuf@hotmail.com (it's a 1meg limit but hey it's free)

    Thanks Lots.
    Cheers,
    Larry

  • #4
    New Coder
    Join Date
    Jun 2002
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    May I also have one copy?
    geqy65@hotmail.com
    Thanks

  • #5
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,068
    Thanks
    0
    Thanked 256 Times in 252 Posts
    quick sample:

    <%
    response.contentType="application/csv"
    response.write "field1,field2,field3"
    %>

    when this page is executed, the download prompt will be displayed, the user then will need to save it as .csv
    Glenn
    ____________________________________

    My Blog
    Tower of Hanoi Android app (FREE!)
    Tower of Hanoi Leaderboard
    Samegame Facebook App
    vBulletin Plugins
    ____________________________________

  • #6
    New Coder
    Join Date
    Jun 2002
    Posts
    64
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question

    allida77,

    Hey, it's asking for two files...
    TFBContent.inc
    taskdownload.asp

    can you offer any help with this.

    Larry

  • #7
    Regular Coder
    Join Date
    Jun 2002
    Location
    Cincinnati, OH
    Posts
    545
    Thanks
    0
    Thanked 0 Times in 0 Posts
    dont worry about TFBContent that is just on of my includes that I forgot to take out, and the code:

    Response.Redirect "taskdownload.asp?f=" & ExFile


    should be

    Response.Redirect "csvdownload.asp?f=" & ExFile

    Sorry about that I changed the filenames that I sent to you and missed that in my code.

  • #8
    New Coder
    Join Date
    Jun 2002
    Posts
    64
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Kewl, Thanks.

    Larry

  • #9
    New to the CF scene
    Join Date
    Aug 2002
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    May I also have one copy?

    May I also have one copy?
    defeaterjp@hotmail.com
    Thanks
    ngoc


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •