Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Importing excel not working
#1
Solved: 10 Years, 9 Months ago
Hi all

I have a problem importing my excel sheets into QTP datatabels, here is my code:

Code:
xlPath = "C:\QTP\Training\Calc\Calc.xls"
xlSheet = "Blad1"

datatable.AddSheet ("TestData")
datatable.ImportSheet xlPath, xlSheet, "TestData"

I get this error message for the last line:
A general error occurred while importing sheet TestData from file C:\QTP\Training\Calc\Calc.xls to sheet Blad1.

Line (18): "datatable.ImportSheet xlPath, xlSheet, "TestData""

The strange thing is that i'm trying to import xlSheet to TestData not the way around as said in the error message!

P.S. the path to the excel file is correct
Reply


Messages In This Thread
Importing excel not working - by Adam82 - 11-02-2012, 02:28 PM
RE: Importing excel not working - by sshukla12 - 11-02-2012, 03:01 PM
RE: Importing excel not working - by Adam82 - 11-02-2012, 03:09 PM
RE: Importing excel not working - by Adam82 - 11-02-2012, 04:56 PM
RE: Importing excel not working - by sshukla12 - 11-05-2012, 10:22 AM
RE: Importing excel not working - by Adam82 - 11-05-2012, 05:22 PM
RE: Importing excel not working - by Ankesh - 11-02-2012, 05:41 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Automate the working of an macro in excel RitaG 1 2,835 11-02-2012, 03:36 PM
Last Post: vjjohnson04
  Importing Data from a Database rajeshwar 8 18,868 04-03-2012, 12:23 AM
Last Post: qtp-qa
Smile importing objects and properties to excel sheet sandy.jakhar 2 3,541 03-16-2011, 03:26 PM
Last Post: sandy.jakhar
  Data importing from excel using script vaigundamoorthy 3 3,525 05-19-2009, 04:53 PM
Last Post: lit_73
  Set the column header in the excelsheet before importing it to local datasheet nageshpv 2 3,195 08-04-2008, 04:05 PM
Last Post: nageshpv

Forum Jump:


Users browsing this thread: 1 Guest(s)