Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Indirect automation
Message
From
23/10/2006 11:56:30
 
 
To
06/10/2006 18:08:15
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
01160243
Message ID:
01163921
Views:
8
>>I am working on a web app that uses a COM dll to access VFP data. I would like to have a function in the server to create an Excel file so it can be shipped to various people via email. I've written a sample function as follows just to see if I can start it up and create a worksheet:
>>
>>function CreateExcelFile
>>oExcel = createobject('Excel.Application')
>>oExcel.Workbooks.Add
>>oBook = oExcel.Workbooks(1)
>>oBook.WorkSheets.Add
>>oSheet = oBook.Worksheets(1)
>>oSheet.range("A1").value = " Sample data "
>>
>>oExcel.visible = .t.
>>endfunc
>>
>>This produces an error that says access is denied. I assume this has to do with permissions on the server. How would I set this up so it will work?
>>
>>
>>Thanks
>
>Don,
>When you call this from a web app, user trying to create excel COM object is internet user (like IUSR_machinename, ASPNET, Network Service).
>You could give permission from DCOM (dcomcnfg.exe) however it is a risk IMHO.
>Instead you might use OWC.spreadheet (OfficeWebComponents).
>Another simplier option is to return back an HTML table or XML or a csv file. Excel can open them all.
>Cetin

Thanks Cetin -
I made it work via the HTML return. Giving it an xls file extn. (rather than htm) sets it up for excel to open it as the default application.
- Don
Previous
Reply
Map
View

Click here to load this message in the networking platform