Create download link for csv file on client-side in javascript.
-
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
-
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
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
-
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
yes all data save in string strCSV
-
yes all data save in string strCSV
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