Micro Focus QTP (UFT) Forums
Importing Excel sheet - Reference Values are not recognized - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: Importing Excel sheet - Reference Values are not recognized (/Thread-Importing-Excel-sheet-Reference-Values-are-not-recognized)



Importing Excel sheet - Reference Values are not recognized - michiusa69 - 03-31-2011

Hey there!

I get an error message (#REF) when trying to import a Excelsheet A with referenced values within A to another Exelsheet B. Is it even possible to do that with QTP?

Thanks you folks!


RE: Importing Excel sheet - Reference Values are not recognized - Anand - 05-13-2011

i have a workaround- read the reference Excel.


RE: Importing Excel sheet - Reference Values are not recognized - supputuri - 05-13-2011

Hi michiusa69,

First of all I have a question, is it mandatory to lmport the file into QTP?
If the answer is not/not sure, then you can read the value directly from the excel rather than importing the sheet into QTP so that you don't loose any data links.


RE: Importing Excel sheet - Reference Values are not recognized - lkng2001 - 01-23-2015

My workaround is to loop through the parameter's values and remove the "[]" from "=[]Sheet1!A1"
Code:
Function RemoveBracket(strSheetName)
    RowCount = Datatable.GetSheet(strSheetName).GetRowCount
    For i = 1 To RowCount
        DataTable.GetSheet(strSheetName).GetParameter("ParameterName").ValueByRow(i) = "=Sheet1!A1"
    Next
End Function