Results 1 to 6 of 6

Thread: Unable to import data into local sheet

  1. #1
    Geek_Guest
    Guest

    Unable to import data into local sheet

    Hello everybody,

    I am new to automation, in learning stage. I have a small doubt. I wrote script for importing data from excel sheet to the datatable as follows:

    DataTable.ImportSheet "path of the excel file" ,1,GlobalThis is working fine.
    QTP is able to import data. But when i am trying to import the data into Local sheet i am unable to do that. Even if I change script the following way, i am not able to do: DataTable.ImportSheet "path of the excel file" ,1,Local ORDataTable.ImportSheet "path of the excel file" ,1,Action1

    Please help me in this regard

    Question asked by visitor venkateshwarrao


  2. #2
    Contributing Member
    Join Date
    Mar 2007
    Answers
    35

    Re: Unable to import data into local sheet

    Hey try this and see..u missed the dbl quotes

    DataTable.ImportSheet "path of the excel file" ,1,"Action1"


  3. #3
    Expert Member
    Join Date
    Apr 2008
    Answers
    1,859

    Re: Unable to import data into local sheet

    hai friend,

    Its very easy

    DataTable.ImportSheet "C:\Documents and Settings\Deepa\Desktop\Abc.xls",2,1

    It will import the data present in the ABC. excel sheet in to the local sheet

    Thanks
    Deepa


  4. #4
    Junior Member
    Join Date
    Apr 2009
    Answers
    25

    Re: Unable to import data into local sheet

    Hi

    do a small change in the Deepa's code and use it, it will work.

    Datatable.ImportSheet "C:\Documents and Settings\Deepa\Desktop\ABC.xls",1,2

    MANI


    Quote Originally Posted by deepasree View Post
    hai friend,

    Its very easy

    DataTable.ImportSheet "C:\Documents and Settings\Deepa\Desktop\Abc.xls",2,1

    It will import the data present in the ABC. excel sheet in to the local sheet

    Thanks
    Deepa



  5. #5
    Expert Member
    Join Date
    Apr 2008
    Answers
    1,859

    Re: Unable to import data into local sheet

    hai friends,

    Syntax of the import sheet

    This is the syntax
    Datatable.ImportSheet FileName.vtSrcSheet,VDstSheet


    Thanks
    Deepa


  6. #6
    Junior Member
    Join Date
    Oct 2010
    Answers
    2

    Exclamation Re: Unable to import data into local sheet

    I hope you can read this soon.

    Can you help me, I am having trouble importing the Excel into QTP

    Impot happens, but does not stay. Once test is complete, everything goes away !

    Quote Originally Posted by Geek_Guest View Post
    Hello everybody,

    I am new to automation, in learning stage. I have a small doubt. I wrote script for importing data from excel sheet to the datatable as follows:

    DataTable.ImportSheet "path of the excel file" ,1,GlobalThis is working fine.
    QTP is able to import data. But when i am trying to import the data into Local sheet i am unable to do that. Even if I change script the following way, i am not able to do: DataTable.ImportSheet "path of the excel file" ,1,Local ORDataTable.ImportSheet "path of the excel file" ,1,Action1

    Please help me in this regard

    Question asked by visitor venkateshwarrao



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact