Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Create download link for csv file on client-side in javascript.

Create download link for csv file on client-side in javascript.

Scheduled Pinned Locked Moved ASP.NET
javascripthtml
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Z Offline
    Z Offline
    zeeShan anSari
    wrote on last edited by
    #1

    Hi all! i have a html table with data.i convert the data into the csv format and save in an string strCSV on client side.Now i want user can download this strCSV value as .csv file on client side. thanks

    N 1 Reply Last reply
    0
    • Z zeeShan anSari

      Hi all! i have a html table with data.i convert the data into the csv format and save in an string strCSV on client side.Now i want user can download this strCSV value as .csv file on client side. thanks

      N Offline
      N Offline
      Not Active
      wrote on last edited by
      #2

      zeeShan anSari wrote:

      want user can download this strCSV value

      The data is already downloaded, its on the client-side!


      I know the language. I've read a book. - _Madmatt

      Z 1 Reply Last reply
      0
      • N Not Active

        zeeShan anSari wrote:

        want user can download this strCSV value

        The data is already downloaded, its on the client-side!


        I know the language. I've read a book. - _Madmatt

        Z Offline
        Z Offline
        zeeShan anSari
        wrote on last edited by
        #3

        yes all data save in string strCSV

        N 1 Reply Last reply
        0
        • Z zeeShan anSari

          yes all data save in string strCSV

          N Offline
          N Offline
          Not Active
          wrote on last edited by
          #4

          You obviously missed the point. You can't download it because it is already downloaded. Where do you think client-side code and data is stored? Must AV software and browsers will not allow you to create a file on the clients system without a specific action and permission. Your best bet would be to create a link that when clicked will download this file from the server. Which, since it has to be spelled out for you, means it is unnecessary to create the data on the client.


          I know the language. I've read a book. - _Madmatt

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups