function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Shailendra SuryawanshiShailendra Suryawanshi 

Import CSV, perform operation and download Excel in VisualForce

Hi,

Functionality:
When user clicks Upload' button, it should upload the CSV file containing IDs, fetch data based on the uploaded IDs, populate the data in Excel sheet and download the Excel sheet.  

I've managed to upload CSV file, read content from CSV file, make web-service call to fetch data.

I'm not able to populate and download the Excel sheet in the same event.

Please help.
AshwaniAshwani
There is attribute for visualforce apex tag <apex: page contentType="" /> You can provide content type for excel as "" so the viualforce page will automatically converted in excle format. Once you recieve the data transfer make that data visible on the visualforce page having the content type set as "application/vnd.ms-excel"