# Reading Excel File Data

This feature is available only for vREST NG Pro Edition. You can read the spreadsheet data by providing the CSV/XLSX file path in the field Read Excel File available in the Details tab of the test case.

vREST automatically converts the CSV/XLSX data into the JSON array. Where each array item corresponds to the individual CSV/XLSX row. vREST stores this JSON array in a variable named as data which you may feed to your test case via the loop source property as shown in the above image.

By default, vREST will read the data from the first sheet in the spreadsheet file. If you want to read the data from a specific sheet in the spreadsheet then you may provide that option using a query parameter format in the file path:

Read Excel File: ${projectDir}/data/api_test_data.xlsx?sheetName=create_api

One example use case of this feature is that you may organize all your test data in a single spreadsheet file and each individual sheet in the spreadsheet file corresponds to the test data for each API.

For Create API:
Read Excel File: ${projectDir}/data/api_test_data.xlsx?sheetName=create_api

For Retrieve API:
Read Excel File: ${projectDir}/data/api_test_data.xlsx?sheetName=view_api

For Update API:
Read Excel File: ${projectDir}/data/api_test_data.xlsx?sheetName=update_api

For Delete API:
Read Excel File: ${projectDir}/data/api_test_data.xlsx?sheetName=delete_api

Example use case of this functionality is data driven testing. For more information on this, please read our guide on Data Driven Testing.