Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error opening Excel file
Message
 
 
To
15/12/2011 17:39:57
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 6 SP5
Miscellaneous
Thread ID:
01531156
Message ID:
01531157
Views:
54
>Hi,
>
>An automation process that used to work is now failing, in Excel 2010, for security reasons. Apparently Excel finds the idea of being automated to open an Excel file suspicious.
>
>The relevant commands are:
>
>
>copy to (lcTempFile) type XLS
>...
>loWorkbookTemp = This.oExcel.oApp.Workbooks.Open(lcTempFile)
>
>
>Excel - if it was previously open - says something about the trust center (similar to the message below, shown in Visual FoxPro).
>
>After accepting the message in Excel, Visual FoxPro gives the error message "You are attempting to open a file type that is blocked by your File Block settings in the Trust center..."
>
>I have used COPY TO ... TYPE XLS to make an Excel automation faster - transfer an entire DBF at once - since transferring one cell at a time would be exceedingly slow, especially for large files.
>
>Any ideas, how best to handle this?
>
>TIA,
>
>Hilmar.

Where you're creating that file? I also think I saw this or similar problem discussed either here or in MSDN VFP forum.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform