how to find Excel file exist or not in vbscript code - 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: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming) +--- Thread: how to find Excel file exist or not in vbscript code (/Thread-how-to-find-Excel-file-exist-or-not-in-vbscript-code) |
how to find Excel file exist or not in vbscript code - sree.85 - 08-13-2012 How can I find whether Microsoft Excel file exists or not using VB Script code in UFT/QTP? It will be great if I can get a working script. RE: how to find Excel file exist or not in vbscript code - Veera0383 - 08-21-2013 Hi, Below code might help you... Code: set objFSO = createobject("Scripting.FileSystemObject") Veera For checking File not exists you can use the below Code: If not objFSO.FileExists("C:\FileFolder\Filename.xls") then RE: how to find Excel file exist or not in vbscript code - akhandesh - 08-22-2013 This is a function library i have written for retrieving the data from an excel sheet. But whenever i tried to execute the same code i get General Run Error. can anybody suggest me the right answer. Code: Function FindObject(ObjectName) General Run Error Function file: C:\Program Files\HP\QuickTest Professional\Tests\FindObject.vbs Line (29): " FindObject=obj(0)" this is the Error i get whenever i execute the Above code How to Debug the General Run Error : - akhandesh - 08-22-2013 Hi, I am getting the below error : when i execute the below code that i have written in Function library. General Run Error Function file: C:\Program Files\HP\QuickTest Pro Code: Function FindObject(ObjectName) |