Syntax *DataTable.ImportSheet(**FileName**, **SheetSource**, **SheetDest**)*
Argument Type Description *FileName* String The full path of the Excel table from which you want to import a sheet. It can be a file system or Quality Center path. SheetSource Variant The name or index of the sheet in the file that you want to import. Index values begin with 1. SheetDest Variant The name or index of the sheet in the Data Table that you want to replace with the *SheetSource*. Index values begin with 1. Example The following example uses the *ImportSheet *method to import the first sheet of the *name.xls* table to the name sheet in the test's run-time Data Table. DataTable.ImportSheet "C:\name.xls" ,1 ,"name" Notes: The column headings in the sheet you import must match the Data Table parameter names in the action for which the sheet is being imported. Otherwise, your test or component may fail. The sheet you import automatically takes the name of the sheet it replaces. On Sat, May 25, 2013 at 9:12 AM, <[email protected]> wrote: > ** > Ok. I will try. But in qtp doc it says that the col names must match the > parameter names. Bit confused. Also does the sheet name need to be same as > sheet name in xls. If not then does qtp import in separate sheet keeping > global sheet and local sheet. if you can share your thoughts ... > > Sent from BlackBerry® on Airtel > ------------------------------ > *From: * Ganesh muralidharan <[email protected]> > *Sender: * [email protected] > *Date: *Sat, 25 May 2013 10:03:42 -0500 > *To: *mercuryqtp<[email protected]> > *ReplyTo: * [email protected] > *Subject: *Re: Importing xl sheet to datatable not working > > We dont need to add parameters before importing so try running after > commenting Datatable.getsheet("student").addparameter "stdname","" stmts > > > On Sat, May 25, 2013 at 9:01 AM, <[email protected]> wrote: > >> ** >> Datatable.import "file" >> >> Does it import all the sheets to datatable. Which datasheet should it >> refer. Global or local. Do you need to have the col name in the datatable >> same as in xls file. Can you please explain in detail. >> Sent from BlackBerry® on Airtel >> ------------------------------ >> *From: * Ganesh muralidharan <[email protected]> >> *Sender: * [email protected] >> *Date: *Sat, 25 May 2013 09:13:51 -0500 >> *To: *mercuryqtp<[email protected]> >> *ReplyTo: * [email protected] >> *Subject: *Re: Importing xl sheet to datatable not working >> >> this seems to be a file issue >> >> >> On Sat, May 25, 2013 at 7:54 AM, <[email protected]> wrote: >> >>> ** >>> Working on qtp 11. Initially I tried xlsx . It said invalid file. >>> >>> I have a. xls file name student containing a sheet student. >>> >>> The sheet have three cols with data. >>> >>> Qtp script have an action name student . >>> >>> Datatable.getsheet("student").addparameter "stdname","" >>> Datatable.getsheet("student").addparameter "stdage","" >>> >>> Datatable.getsheet("student").addparameter "stdaddress","" >>> >>> Datatable.importsheet "path of the file", "student", "student" >>> >>> Error - a general error occured while importing sheet student from file >>> : "file path " >>> Sent from BlackBerry® on Airtel >>> ------------------------------ >>> *From: * Ganesh muralidharan <[email protected]> >>> *Sender: * [email protected] >>> *Date: *Sat, 25 May 2013 08:46:46 -0500 >>> *To: *mercuryqtp<[email protected]> >>> *ReplyTo: * [email protected] >>> *Subject: *Re: Importing xl sheet to datatable not working >>> >>> are you importing a .xls file or a .xlsx file? >>> >>> >>> On Sat, May 25, 2013 at 7:47 AM, <[email protected]> wrote: >>> >>>> Saying a general error ... >>>> Sent from BlackBerry® on Airtel >>>> >>>> -- >>>> -- >>>> 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 >>>> >>>> --- >>>> You received this message because you are subscribed to the Google >>>> Groups "QTP - HP Quick Test Professional - Automated Software Testing" >>>> group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to [email protected]. >>>> For more options, visit https://groups.google.com/groups/opt_out. >>>> >>>> >>>> >>> >>> >>> -- >>> Regards, >>> >>> >>> Ganesh Muralidharan >>> 'God Never Forgets' >>> >>> -- >>> -- >>> 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 >>> >>> --- >>> You received this message because you are subscribed to the Google >>> Groups "QTP - HP Quick Test Professional - Automated Software Testing" >>> group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> For more options, visit https://groups.google.com/groups/opt_out. >>> >>> >>> >>> -- >>> -- >>> 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 >>> >>> --- >>> You received this message because you are subscribed to the Google >>> Groups "QTP - HP Quick Test Professional - Automated Software Testing" >>> group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> For more options, visit https://groups.google.com/groups/opt_out. >>> >>> >>> >> >> >> >> -- >> Regards, >> >> >> Ganesh Muralidharan >> 'God Never Forgets' >> >> -- >> -- >> 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 >> >> --- >> You received this message because you are subscribed to the Google Groups >> "QTP - HP Quick Test Professional - Automated Software Testing" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> For more options, visit https://groups.google.com/groups/opt_out. >> >> >> >> -- >> -- >> 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 >> >> --- >> You received this message because you are subscribed to the Google Groups >> "QTP - HP Quick Test Professional - Automated Software Testing" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> For more options, visit https://groups.google.com/groups/opt_out. >> >> >> > > > > -- > Regards, > > > Ganesh Muralidharan > 'God Never Forgets' > > -- > -- > 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 > > --- > You received this message because you are subscribed to the Google Groups > "QTP - HP Quick Test Professional - Automated Software Testing" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > > > > -- > -- > 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 > > --- > You received this message because you are subscribed to the Google Groups > "QTP - HP Quick Test Professional - Automated Software Testing" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- Regards, Ganesh Muralidharan 'God Never Forgets' -- -- 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 --- You received this message because you are subscribed to the Google Groups "QTP - HP Quick Test Professional - Automated Software Testing" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
