Discussion:
To use Excel COM interop ...
(too old to reply)
Mark Dickens
2007-01-30 10:39:51 UTC
Permalink
"To use COM interop, you must have administrator or Power User security
permissions"

What exactly does this mean? Surely using the Excel interop DLL doesn't
require such sweeping security permissions?

I'm looking to develop a software solution using Excel interop for a
customer whose users have fairly constrained permissions. I'm not sure
what questions I need to ask to ensure this would be feasible.

Any help would be greatly appreciated.

Thanks

Mark
jam96-BuffaloJoe
2007-03-01 21:36:03 UTC
Permalink
The question you want to ask:

In this 'constrained' environment,
How do I automate a instance of an excel application.

If the user has the ability to open an excel .xls.

You might try and open excel with another method.
Interop.Excel (reference)
dim oExcel as Excel.Application
Dim myWB as Excel.Workbook
dim MyWS as Excel.Worksheet

Use:

oExcel = new Excel.Application
myWB = oExcel.Workbooks.Add(Excel.XLWBATemplate.xlWBATWorksheet)
myWb.Worksheets.Add(,myWB.Workseets(1))
myWS = myWB.Worksheets(1)
myWS.Select()


get your data...

set a reference to your location on the .xls

then set the cells

myWS.Cells(iRow,1) = "Your Data"

oExcel.Visible = true


User's must have a valid Excel Software Registration.
Post by Mark Dickens
"To use COM interop, you must have administrator or Power User security
permissions"
What exactly does this mean? Surely using the Excel interop DLL doesn't
require such sweeping security permissions?
I'm looking to develop a software solution using Excel interop for a
customer whose users have fairly constrained permissions. I'm not sure
what questions I need to ask to ensure this would be feasible.
Any help would be greatly appreciated.
Thanks
Mark
Mark Dickens
2007-03-21 10:47:51 UTC
Permalink
Thanks for the reply. Suck it & see was the best approach. I was able to
do all that I wanted as a constrained user.

Guess I shouldn't believe such statements in futire
Post by jam96-BuffaloJoe
In this 'constrained' environment,
How do I automate a instance of an excel application.
If the user has the ability to open an excel .xls.
You might try and open excel with another method.
Interop.Excel (reference)
dim oExcel as Excel.Application
Dim myWB as Excel.Workbook
dim MyWS as Excel.Worksheet
oExcel = new Excel.Application
myWB = oExcel.Workbooks.Add(Excel.XLWBATemplate.xlWBATWorksheet)
myWb.Worksheets.Add(,myWB.Workseets(1))
myWS = myWB.Worksheets(1)
myWS.Select()
get your data...
set a reference to your location on the .xls
then set the cells
myWS.Cells(iRow,1) = "Your Data"
oExcel.Visible = true
User's must have a valid Excel Software Registration.
Post by Mark Dickens
"To use COM interop, you must have administrator or Power User security
permissions"
What exactly does this mean? Surely using the Excel interop DLL doesn't
require such sweeping security permissions?
I'm looking to develop a software solution using Excel interop for a
customer whose users have fairly constrained permissions. I'm not sure
what questions I need to ask to ensure this would be feasible.
Any help would be greatly appreciated.
Thanks
Mark
Loading...