Hi,
Try this.
Set objDictionary=CreateObject("Scripting.Dictionary")
Set exo=CreateObject("Excel.Application")
Set wbo=exo.Workbooks.Open(<FilePath>)
Set wso=wbo.Worksheets(<Sheet Name>)
For i=1 to wso.usedrange.rows.count
For j=1to wso.usedrange.columns.count
objDictionary.Add join(split(wso.cells(i,j).address,"$"),""),
wso.cells(i,j).value
Next
Next
wbo.close
exo.Quit
Set wso=nothing
Set wbo=nothing
Set exo=nothing
Set objDictionary=nothing
On Wed, Sep 12, 2012 at 10:46 PM, vamsi reddy <[email protected]> wrote:
> Hi All,
> I face a qn in an interview
> How to load Excel as a dictionary Object
>
>
>
> I know little bit about the query
> I don't know how to integrate it...
>
>
> 1. Datatable.Import"C:\Documents and Settings\VAMSI\Desktop\input_data.xls"
>
> Set ODic = Scripting.dictionary
> ODisc.Add"A" = ""
> ODisc.Add"B" = ""
> ODisc.Add"C" = ""
>
> For each in Loop
>
>
>
> --Thanks
> --
> Vamsi Reddy
> *
> *
>
> * *
>
>
> --
> You received this message because you are subscribed to the Google
> "QTP - HP Quick Test Professional - Automated Software Testing"
> group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/MercuryQTP?hl=en
>
--
Regards,
Deepak
--
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en