Micro Focus QTP (UFT) Forums

Full Version: GetCellData from a global sheet
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey guys,

I need to pull data from a specific cell in my datatable, i imported it from excel and now I want it to search to see the value in whatever cell I designate. Excel_Row is the current row. I developed a function that returns Column_Index, a numerical value representing a particular column. So to find the data in the Cell I wrote:
I
Code:
nput_Value = Datatable.GetCellData(Excel_Row,Column_Index)

I'm having an error come up that reads :
Object doesn't support this property or method: 'datatable.GetCellData'

This is because GetCellData requires a object. Is there a way I can tell QTP to consider my datatable a object or a different command altogether to give me the cell data?

Thanks,
Jay

Resolved, I used Datatable.RawValue(Column_Index, dtGlobalsheet)

Thanks for looking anyway
Hi,

Try this:
Code:
DataTable.GetSheet("SheetID").SetCurrentRow(Excel_Row)
Input_Value = DataTable.GetSheet("SheetID").GetParameter("ColumnName")