"Use first row as header" of Excel file issue


On version 6.1.5 if the excel sheet is empty, except the header (row 1), the test data not detect first row as header … There is no header into the test data.

Best regards,

Hi Nicolas,

You can try to use this approach in order for your program to read the first row as header

//import this. . . 
import com.kms.katalon.core.testdata.ExcelData

//use this line
Object excelValues = ExcelFactory.getExcelDataWithDefaultSheet(String excelPath, String sheetName, boolean hasHeaders)

put your excel directory in the first parameter
second parameter for the sheet name
and the last parameter, if you put 'true' then first row of your excel will become headers.
If 'false' then it will be only values.

For more infos, kindly take time to read this. . . .

Hope that helps. . . :slight_smile:

i closed this as it is inactive