Error 1429 Ole Idispatch Exception Code 0 From Microsoft Excel
SQL Server 2014 Express resources Windows Server 2012 resources Programs MSDN subscriptions Overview Benefits Administrators Students Microsoft Imagine Microsoft Student Partners ISV Startups TechRewards Events Community Magazine Forums Blogs Channel 9 Documentation APIs and reference Dev centers Retired content Samples We’re sorry. The content you requested has been removed. You’ll be auto redirected in 1 second. Ask a question Quick access Forums home Browse forums users FAQ Search related threads Remove From My Forums Answered by: need code to open an Excel spreadsheet from inside a VFP app Visual FoxPro > Visual FoxPro General Question 0 Sign in to vote I have an app that I'm using to export data from a table into an Excel worksheet. After the export, I want to open the worksheet in Excel. Need help with code to do this. Thanks! Tuesday, February 26, 2008 9:29 PM Reply | Quote Answers 0 Sign in to vote You may try: lcFile = "c:\temp\ACH_EXPORT.XLS" oWSH = CREATEOBJECT("wscript.shell")
oWSH.Run("Excel" + " " + lcFile, 3, .T.) Wednesday, February 27, 2008 6:22 PM Reply | Quote 0 Sign in to vote heyblue21 wrote: Update: The file name in variable "lcFile" is never getting created, but I don't see the issue with the syntax there. Maybe another set of eyes can detect this? The examples posted here read from an excel file named in the lcFile variable. This file has to pre-exist and be in the proper foilder you are looking at. If you want to create an excel file (i.e. save a spereadsheet) using automation you have to write to it (with the oWorkbook.SaveAs() method for example). See examples: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=457681&SiteID=1 http://fox.wikis.com/wc.dll?Wiki~ExcelAutomation Wednesday, February 27, 2008 7:27 PM Reply | Quote 0 Sign in to vote COPY TO lcFile TYPE XLSMake that:COPY TO (lcFile) TYPE XL5Right now, you're creating a file called lcFile.XLS and it's in Excel 2 format.Tamar Wednesday, February 27, 2008 9:47 PM Reply | Quote Answerer All replies 0 Sign in to vote loExcel = Createobject("Excel.Application") With loExcel .Workbooks.Open(lcFile) .Visible = .t. Endwith Wednesday, February 27, 2008 12:51 AM Reply | Quote 0 Sign in to vote This is my code... lcFile = "c:\temp\ACH_EXPORT.XLS" COPY TO lcFile TYPE XLS WAIT WINDOW STARTXL_LOC NOWAIT loExcel = Createobject("ExJoin INTELLIGENT WORK FORUMSFOR COMPUTER PROFESSIONALS Log In Come Join Us! Are you aComputer / IT professional?Join Tek-Tips Forums! Talk With Other Members Be Notified Of ResponsesTo Your Posts Keyword Search One-Click Access To YourFavorite Forums Automated SignaturesOn Your Posts Best Of All, It's Free! Join Us! *Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail. Posting Guidelines Promoting, selling, recruiting, coursework and thesis posting is forbidden.Tek-Tips Posting Policies Jobs Jobs from Indeed What: Where: jobs by Link To This Forum! Add Stickiness To Your https://social.msdn.microsoft.com/Forums/en-US/ca23a0ab-1e67-4ac8-b274-0bde7aa66589/need-code-to-open-an-excel-spreadsheet-from-inside-a-vfp-app?forum=visualfoxprogeneral Site By Linking To This Professionally Managed Technical Forum.Just copy and paste the BBCode HTML Markdown MediaWiki reStructuredText code below into your site. Microsoft: Visual FoxPro Forum at Tek-Tips HomeForumsProgrammersDBMS PackagesMicrosoft: Visual FoxPro Forum Excel Automation: What's wrong with my code? thread184-441250 Forum Search FAQs Links MVPs Excel Automation: What's wrong with my code? Excel Automation: What's wrong with my code? ganj http://www.tek-tips.com/viewthread.cfm?qid=441250 (IS/IT--Management) (OP) 7 Jan 03 03:48 I am getting the following error in a form method that creates an Excel worksheet from an underlying VFP cursor:Error #1429 in Outputexcel....OLE IDispatch exception code 0 from Microsoft Excel: Unable to set the PrinTitleRows property of the PageSetup class .....The piece of code in question:WITH oActiveSheet.PageSetup.PrintTitleRows = "$1:$1".PrintTitleColumns = ""ENDWITHStrange enough, this code produces no problem since about a year. Now the customer upgraded to Win2K with Office 2000 (SP1) and suddently I have this thing....Can anybody enlighten me what's wrong with my code? RE: Excel Automation: What's wrong with my code? mgagnon (Programmer) 7 Jan 03 04:47 ganjWITH oActiveSheet.PageSetup.PrintTitleRows = "$1:$1".PrintTitleColumns = ""ENDWITHCan you explain what the code is suppose to do? I tried your code on Win98 (Excel 2002), and I don't get an error, but it doesn't seem to do much either. Mike GagnonIf you want to get the best response to a question, please check out FAQ184-2483 first. RE: Excel Automation: What's wrong with my code? ganj (IS/IT--Management) (OP) 7 Jan 03 05:06 Mike,this code is preceeded by other code, basically creating the excel object, pasting da
Programmatically retrieve Excel error Subject: Programmatically retrieve Excel error Thread ID: 412471 Message ID: 412471 # Views: 60 # Ratings: 0 Version: Visual FoxPro 9 SP2 Category: Microsoft Office Automation Date: Monday, September 29, 2014 12:33:06 PM This message was rated by: Footer When we https://www.foxite.com/archives/programmatically-retrieve-excel-error-0000412471.htm do Excel automation we save the spreadsheet at the end. We set DisplayAlerts = .F. before we do so in order that the "A file named ... already exists in this location. Do you want to replace it" prompt is automatically confirmed http://computer-programming-forum.com/2-vfp/22d66a1a996bd4ea.htm with a Yes response and the spreadsheet is saved. That works great for 99.9% of our users. We have a couple of users - ironically or coincidentally (or not) both at the same site where even though we do this the application error 1429 gets an error 1429:OLE IDispatch exception code 0 from Microsoft Excel: Unable to get the SaveAs property of the Workbook class....using Try...Catch and then making multiple attempts we suppress this error message and retry in a slightly different way but then also get another error 1429:OLE IDispatch exception code 0 from Microsoft Excel: Unable to get the Save property of the Application class.So it is clear that something serious is stopping us from saving changes to the spreadsheets on these two workstations. It is error 1429 ole worth noting that the files should not be locked or read-only or anything else due to file access issues because our application has just created the file a little earlier in the process and also very interestingly if we create the Excel file by doing a COPY TO ... TYPE XLS (version 2) we don't get this issue on these workstations but if we do a COPY TO ... TYPE XL5 (version 5) then we do get the problem so Excel doesn't appear to like XL5 type spreadsheets on these workstations. The users are on Excel 2013.File-block settings in the Trust Center should also not be an issue because a) we have altered the settings to allow all workbook versions and b) version 5s don't appear to get blocked anyway.It shouldn't be caused by file or folder permissions in the location that we are working with because of the fact that this works fine if it is a v2 file but not if it is a v5 file and they still get saved in the same folder with the same filename either way.We want to do XL5 (version 5) where possible because of the fact that MS are not currently blocking version 5 workbooks and if we eradicate all the version 2s in our application then that will ultimately reduce a support overhead for us because we won't have to talk users through changing their Excel file block settings but at this site specifically using v5 instead of the v2 de
error when I ran a mail merge program I ran a sample mail merge program in fox pro. I get this error about OLE IDISPATCH exception code 0 from Microsoft word. Word was unable to open data source. How do I fix this error? Mon, 21 Feb 2005 22:30:26 GMT Raymond Hartma#2 / 2 OLE IDISPATCH exception code 0 error when I ran a mail merge program you don't give enough info to see what is wrong. I have done mail merge with word. I found that I would create a free table to use, that provided the data for the mail merge. Quote:> I ran a sample mail merge program in fox pro. > I get this error about OLE IDISPATCH exception code 0 > from Microsoft word. Word was unable to open data source. > How do I fix this error? Tue, 22 Feb 2005 00:39:05 GMT Page 1 of 1 [ 2 post ] Relevant Pages 1. OLE IDispatch exception code 1004 from Microsft Excel 2. ole idispatch exception code 0 3. OLE IDispatch exception code 1004 from Microsft Excel 4. 'OLE IDispatch exception code 0 5. OLE IDispatch exception code 4096 6. error 1440 ole exception error OLE object may be corrupt 7. Help with: ERROR 1429 OLE |Dispatch exception code 0 8. OLE error code 0x80030003: Unknown OLE status code. 9. OLE Error code while running from general field 10. VFP6 and MS Word OLE Mail Merge 11. word97 ,VFP, Mail Merge & OLE linking 12. From VFP, run a Word mail merge Powered by phpBB Forum Software