Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Indirect automation
Message
From
06/10/2006 18:08:15
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
06/10/2006 17:08:14
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
01160243
Message ID:
01160258
Views:
9
>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
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform