Quality Center / ALM Practitioners Forum
Showing results for 
Search instead for 
Do you mean 

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

Occasional Advisor

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
7 REPLIES
Occasional Advisor

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 Honored Contributor

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

is you Excel Sheet read onlny or password protected?
Honored Contributor Honored Contributor

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

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 Honored Contributor

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

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

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.