Custom Search

Tutorial:

SQL
VBA

Home >> Reporting >> CSV

Extract Data from CSV file
We can open CSV file into excel by double clicking on it, but it can change the data format. So to keep the data into proper format we should use the following way to open CSV data into excel.

1. Click on file menu from excel window. Then click on open option from the file menu.
2. This will open the following dialog box. Select all files from File Type combo box as show below.

3. Select the CSV file that you want to open and then click on open button.
4. The following window will come up. Select the appropriate option (Fixed if your data contain space between two fields or Delimited if your data fields are separated by commas or tabs). In the preview of selected data option you can see how your data is separated? Then click next button.

5. In the following dialog box you can see there are different Delimiters options, you can select appropriate one. If you are unsure which option to select then you can look the data in data preview option. It will show you how your data will look within the excel sheet. You can select one by one option and then based on data preview you can decide which option is best for your data.

6. Then click on next button. the following window will come up. In this window you can select the data format for each field. By default all fields are set to general. That means numeric Field in CSV file is converted to number, Data value to dates and all remaining field changed to text. To change the data type of particular field you can select that field from data preview option, and then you can select appropriate data format option. You can also specify the starting address of the column where you want to see the data.

7. Now click on finish button. It will show the resulted data in the Excel worksheet as shown below. In the following window you can see some formatting, this is done once data is available into excel sheet.