Micro Focus QTP (UFT) Forums
GetCellData from a global sheet - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: GetCellData from a global sheet (/Thread-GetCellData-from-a-global-sheet)



GetCellData from a global sheet - J112910f - 01-05-2011

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


RE: GetCellData from a global sheet - manishbhalshankar - 01-06-2011

Hi,

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