QTP : The DataTable.Import (file) operation failed. (2127 Views)
Reply
Occasional Advisor
SandeepBashetti
Posts: 11
Registered: ‎09-13-2009
Message 1 of 8 (2,127 Views)

QTP : The DataTable.Import (file) operation failed.

Hi All,

I am getting the following error, while importing an excel file to a data table,
"The DataTable.Import (file) operation failed. File contains a feature not supported by Formula One"

Please help me in resolving this issue.

Thanks,
Sandeep
Occasional Advisor
SandeepBashetti
Posts: 11
Registered: ‎09-13-2009
Message 2 of 8 (2,127 Views)

Re: QTP : The DataTable.Import (file) operation failed.

Small observation, when i unprotect the excel sheet problem gone away. but, as per my requirement excel sheet must be protected.
So, is there any way to import a protected excel sheet data to a data table.

Thanks,
Sandeep
Honored Contributor
Thomas Köppner
Posts: 556
Registered: ‎02-10-2009
Message 3 of 8 (2,127 Views)

Re: QTP : The DataTable.Import (file) operation failed.

is you Excel Sheet read onlny or password protected?
Honored Contributor
Sperk
Posts: 933
Registered: ‎04-22-2009
Message 4 of 8 (2,127 Views)

Re: QTP : The DataTable.Import (file) operation failed.

Who do you want to hide the workbook password from, the person running the script?

If so I think you are stumped, if not why not create 2 VBS functions one that:

opens the workbook with visible = false, unprotects the workbook
saves the woorkbook
closes the workbook

One that:

opens the workbook with visible = false
Protects the workbook
saves the workbook
closes the workbook

Then in QTPL

Call UnprotectWorkBook
ImportSheet
Call ProtectWorkBook


Mark Smith.
Occasional Advisor
SandeepBashetti
Posts: 11
Registered: ‎09-13-2009
Message 5 of 8 (2,127 Views)

Re: QTP : The DataTable.Import (file) operation failed.

Hi Smith, thanks for the response.

Yeah, I want to hide the password from the user who is going to run the script.

In this case how can i import the protected excel sheet to a data table of qtp script without exposing password from the script?

If possible you can suggest any other possible way of doing it.

Thanks for the support.
Honored Contributor
Sperk
Posts: 933
Registered: ‎04-22-2009
Message 6 of 8 (2,127 Views)

Re: QTP : The DataTable.Import (file) operation failed.

It's going to be difficult hiding the password from the QTP user.

Even if you hold it encrypted somewhere at some point it needs to be decrypted and this then can be viewed in the debug viewer.


Mark Smith.
Regular Advisor
crazy_princess
Posts: 171
Registered: ‎10-31-2008
Message 7 of 8 (2,127 Views)

Re: QTP : The DataTable.Import (file) operation failed.

Sandeep whats the point in hiding password? and why do you want to hide the password?
Occasional Advisor
SandeepBashetti
Posts: 11
Registered: ‎09-13-2009
Message 8 of 8 (2,127 Views)

Re: QTP : The DataTable.Import (file) operation failed.

some fields in excel file has to be protected and we should not allow script runner to edit those fields but can modify other fields. Script imports data from excel file and uses it. So in this case, if password was exposed in script to unprotect and import then there is no meaning in protecting fields of excel file.

My aim is to protect some fields of excel file which should not cause any problem in importing to data table of qtp script.At the same time no passwords should be exposed from script.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.