Here is a example to read a csv file and display it in a pageblocktable. We will see a working example code to import csv file using apex visualforce
Following example reads a csv file having account records in it and displays them in a table when "Read csv" button is pressed.
Below is Csv file format that we will use to import csv file using apex visualforce
Output screen shot: