Hi All,
Is it possible to read the excel file and fetch the data from each cell? Please share your thoughts.
set iRowNo to "A"
set iCellCount to "2"
set SheetName to "Sheet1"
ExcelFileReadingData(iRowNo, iCellCount, SheetName)
on ExcelFileReadingData(iRowNo, iCellCount, SheetName)
-- open the file
set xlsFilePath to (path to desktop as text) & "SofTestSmokeAutomationSuite:DataSheet.xlsx"
tell application "Microsoft Excel" to open file xlsFilePath
delay 2
-- hide excel
tell application "System Events"
set excel to first process whose name is "Microsoft Excel"
set visible of excel to false
end tell
-- get the value
tell application "Microsoft Excel"
set iCellValue to (value of range (iRowNo & iCellCount) of worksheet SheetName of workbook 1) as text
end tell
return iCellValue
end ExcelFileReadingData
I have the above code, but it get particular cell value. I want to be generic need to get each column cell value.