Category Archives: Excel

Reading Data From Excel using SenseTalk in Eggplant

How to read data from excel using SenseTalk in Eggplant


//Here we are reading the data from excel and treating it as Database

set myExcelDB to table ("Sheet1") of (type:"excel", file:"C:\TestExcel\Test.xlsx")
put the records of myExcelDB into Patients
put the number of items in Patients into totalItems

//Repeate for all the iterations
repeat totalItems times
//This will be set as false in case any errors occours in between
set columnData to item repeatIndex() of Patients
log columnData.PatientLastName
log columnData.PatientFirstName
end Repeat

This is how your excel file would looks like for the code above.

This is what the execution looks like for the code above.