Error Calling External Object Function Open At Line
be down. Please try the request again. Your cache administrator is webmaster. Generated Mon, 10 Oct 2016 16:18:38 GMT by s_ac15 (squid/3.5.20)
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss http://answers.microsoft.com/en-us/windows/forum/windows_vista-performance/error-35-error-calling-external-object-function/14149fa5-e608-429e-aaf3-37d5938966af Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Error on Excel importing up vote 1 down vote favorite I am trying to import around 1500 Excel files to http://stackoverflow.com/questions/5050888/error-on-excel-importing my system. The code is working in a loop and I am able open and import around 600 Excel files. After that I am getting an error message like: Error calling external object function open at line 55..... I really stuck with this issue, if anyone can help that will be grateful. Code posted in reply comments: For ll_LoopCnt = 1 To Dw_1.rowcount( ) Ls_File_Name = Dw_1.getitemstring( ll_LoopCnt, "file_name") Ls_Path =Dw_1.getitemstring( ll_LoopCnt, "file_path") ll_Sr_No= Dw_1.getitemNumber( ll_LoopCnt, "sr_no") ldt_File_Date= Dw_1.getitemDateTime( ll_LoopCnt, "file_date") Excel.Application.DisplayAlerts = "False" Excel.WorkBooks.Open( Ls_Path ) Excel.Application.Visible = False Excel.windowstate = 2 // 1 : Normal, 2 : Minimize, 3 : Maximize Excel.Application.CutCopyMode = False Lb_sheet_rtn = excel.worksheets(7).Activate Ls_ClipBoard = clipboard() Excel.Application.ActiveWorkbook.Save() Excel.Worksheets(7).UsedRange.Copy ll_cnt = ds_1.importclipboard() IF ll_cnt <= 1 THEN Messagebox("Error", "Could not find.") Else Dw_1.Scrolltorow( ll_LoopCnt ) Dw_1.SetItem( ll_LoopCnt, "status", 'Success') For ll_Inner_LoopCnt = 1 To Ds_1.RowCount( ) Ds_1.Object.file_path[ll_Inner_LoopCnt] = Ls_Path Ds_
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company http://stackoverflow.com/questions/9579658/excel-object-saveas-error-happens-when-existing-file-is-open Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Excel Object SaveAs, error happens when Existing File is Open up vote 0 down vote favorite Excel_Obj = CREATE OleObject Excel_Obj.ConnectToNewObject( 'excel.application' error calling ) Excel_Obj.Workbooks.Add Excel_Obj.Application.ActiveWorkbook.WorkSheets.Add Excel_Sheet = Excel_Obj.Application.ActiveWorkbook.WorkSheets[1] //EXAMPLE Excel_Sheet.Cells[1,1] = 45 Excel_Obj.Application.ActiveWorkbook.SaveAs(ls_file,56) //csv //where ls_file = the Opened File error happened after / during saveas. try catch throw "error calling external object..in click..line.. saveas.." -- i want to state to the user that the excel file is open therefore cannot be overwritten properly. I used a try catch and throwed a proper message but before the messagebox for the catch event happens, the PB execution error calling external error R0035 happens. any solutions or proper way to know if the excel file is open. excel ms-office ole powerbuilder share|improve this question edited Apr 7 '14 at 19:09 Kara 3,14473147 asked Mar 6 '12 at 7:39 Sid 32711742 add a comment| 5 Answers 5 active oldest votes up vote 0 down vote You might be able to check if the file is open first, have a look at this answer: how to check if file is opened in excel using OLE (leaves excel process open) share|improve this answer answered Mar 6 '12 at 12:47 Colin Pickard 32k869126 i could do those using try catch in Powerbuilder. the true problem relies on the PB Execution Error upon knowing the file is open. not before. i also put it inside try, but the error still popped out. i dont think my users will ignore this,lol –Sid Mar 7 '12 at 1:04 i still need some help on this. I havent figured this out. my users want a perfect excel extract system. Thanks for the answers...! –Sid Mar 8 '12 at 7:12 add a comment| up vote 0 down vote I'd try a PowerScript FileOpen () call with a LockReadWrite! parameter to see if it can be opened, followed immediately by a FileClose () if it was successful