You need to sign in to do that
Don't have an account?

Downloading .csv file from static resource giving excel file.
Hi All,
I am storing a standard template(.csv file) which user can use to enter records and then they will upload file and then with the help of apex(controller) records will inserted in objects.
But the problem is when user download template from static resource its giving file in excel format but not in .csv format as file was stored in static resource as .csv format.
So can anyone help me with this issue and tell me where i am wrong?
Is there is any way to upload records by using excel file using apex(controllers)?
Hi Vijay,
You want to store the .csv file in static resource and then you want download it in .csv format. If this is the case then instead of storing .csv file in static resource, store it in documents and then download it . It will give you file in .csv format.
If it works, please mark it as solution.
Thanks
Sunil Kumar
All Answers
Hi Sunil ,
Same problem here ! when I am putting fileName.csv in static resource and when download the extension I got .xls and all the column values are wraps in single column saparated by camma while I want all column values should be in different columns as I had .
please let me know if any suggestion !
Thanks
Vijay
Hi Vijay,
You want to store the .csv file in static resource and then you want download it in .csv format. If this is the case then instead of storing .csv file in static resource, store it in documents and then download it . It will give you file in .csv format.
If it works, please mark it as solution.
Thanks
Sunil Kumar
Thank you very much sunil ,
It works fine . Thanks again.