Ole Error Calling External Object Function
here for a quick overview of the site Help Center Detailed answers to any questions you might error calling external object function powerbuilder have Meta Discuss the workings and policies of this site About powerbuilder application execution error (r0035) Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting powerbuilder error 35 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 6.2 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 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_1.Object.file_name[ll_Inner_LoopCnt] = Ls_File_Name Ds_1.Object.file_sr_no[ll_Inner_LoopCnt] = ll_Sr_No Ds_1.Object.file_date[ll_Inner_LoopCnt] = ldt_File_Date Next END IF Clipboard(ls_ClipBoard) Ds_1.Reset( ) //Reset the data store Excel.Application.ActiveWorkbook.Save() Excel.Application.ActiveWorkbook.Close(False); Excel.Application.Quit Excel.Application.CutCopyMode = False IF ll_LoopCnt = ll_Excel_Cnt Then //--->> After 100 files reset the memmory ll
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 Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: http://stackoverflow.com/questions/5050888/error-on-excel-importing Sign up Powerbuilder word OLE: Run time error 35 while setformresult up vote 0 down vote favorite I am using powerbuilder 12.5 to add data to word templates using bookmarks.When I use objword.setformresult(bookmarkname,value) I get run time error 35 "error calling external object function setformresult" Info: We have recently migrated powerbuilder 6.5 to 12.5 but still we use Office 2003 ole powerbuilder share|improve http://stackoverflow.com/questions/22946090/powerbuilder-word-ole-run-time-error-35-while-setformresult this question edited Apr 10 '14 at 11:12 asked Apr 8 '14 at 19:08 jeyaganesh 44331740 add a comment| 1 Answer 1 active oldest votes up vote 0 down vote This is how I do it: lole_word = CREATE OLEObject lole_word.ConnectToNewObject ("word.application") lole_Document = lole_word.Documents.Open (is_infile,FALSE,TRUE,FALSE) lole_range = lole_document.Bookmarks.item(ls_bookmark).Range lole_range.Text = ls_newText Always put code like this a Try..Catch block and catch OleRuntimeError and RuntimeError. Note that replacing the text will remove the bookmark. If you need the bookmark you have to remember where it is (for example lole_document.Bookmarks.item(ls_bookmark).Start) and add the bookmark to the document again. share|improve this answer answered Apr 9 '14 at 11:54 Hugh Brackett 2,500618 Program successfully connects to word application and reads through the bookmarks.The error occurs when updating the bookmar with data. –jeyaganesh Apr 10 '14 at 3:45 Error occurs on lole_range.Text = ls_newText –jeyaganesh Jun 16 '14 at 12:10 What's the error you get? Are you sure ls_newText isn't NULL? –Hugh Brackett Jun 20 '14 at 21:58 this error happens because the template bookmarks where created as fields not a
and SafetyAsset NetworkAsset Operations and MaintenanceCommerceOverviewSubscription Billing and Revenue ManagementMaster Data Management for https://groups.google.com/d/topic/sybase.public.powerbuilder.general/X36Aa9DNLtc CommerceOmnichannel CommerceFinanceOverviewAccounting and Financial CloseCollaborative Finance OperationsEnterprise Risk and ComplianceFinancial Planning and AnalysisTreasury and error calling Financial Risk ManagementHuman ResourcesOverviewCore Human Resources and PayrollHuman Capital AnalyticsTalent ManagementTime and Attendance ManagementManufacturingOverviewManufacturing NetworkManufacturing OperationsResponsive ManufacturingMarketingOverviewMarket with Speed and AgilityUnique Customer ExperiencesReal-Time Customer InsightsR&D/EngineeringOverviewDesign NetworkDesign OrchestrationProject and error calling external Portfolio ManagementSalesOverviewCollaborative Quote to CashSales Force AutomationSales Performance ManagementSelling Through Contact CentersServiceOverviewEfficient Field Service ManagementOmnichannel Customer ServiceTransparent Service Process and OperationsSourcing and ProcurementOverviewContingent Workforce ManagementDirect ProcurementSelf-Service ProcurementServices ProcurementStrategic Sourcing and Supplier ManagementSupply ChainOverviewDemand ManagementDemand NetworkLogistics NetworkManufacturing Planning and SchedulingResponse NetworkResponse and Supply ManagementSales, Inventory, and Operations PlanningTransportation ManagementWarehouse ManagementSustainabilityOverviewEnvironment, Health, and SafetyProduct Safety and Stewardship NetworkBrowse by IndustryAerospace and DefenseAutomotiveBankingChemicalsConsumer ProductsDefense and SecurityEngineering, Construction, and OperationsHealthcareHigh TechHigher Education and ResearchIndustrial Machinery and ComponentsInsuranceLife SciencesMediaMill ProductsMiningOil and GasProfessional ServicesPublic SectorRetailSports and EntertainmentTelecommunicationsTravel and TransportationUtilitiesWholesale
von GoogleAnmeldenAusgeblendete FelderNach Gruppen oder Nachrichten suchen