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

upload a csv file by using visualforce


          i want to uplad a csv file into my custom object,, through visualforce page

 after upload is done i want display the csv file records in same visual force page only can any one suggest me how it is possible.


Hi Krish,


This should give you the information you need:


In short, use:

<apex:inputFile value="{!document.body}" filename="{!}" id="file"/>

 To select a file and get the data from it, then you can access this in your controller on the click of the upload button and do what you want with it (store as document, attachment or convert into records etc...).