Secure OleDb Connection to a Microsoft Excel Workbook

W

William Foster

Good morning all,

I want to password protect a Microsoft Excel Workbook containing all my
reference tables for a program, so that I can place the workbook in a
central location that is accessible by all, but so they can not wreck
it.

I am accessing the workbook via an OleDbConnection through the
System.Data.OleDb framework.

I have looked a few different help items and newgroups posts, but they
relate to Microsoft Access, not Microsoft Excel.

I would have thought it would have been as easy as
Connenction.Password(“XXXX”); but unfortunately it does not appear to be
that simple.

Any assistance you may be able to provide would be greatly appreciated

Yours sincerely,

William Foster
 
W

William Foster

Larry,

I realise that Excel isn't a database, but I am unable to use Microsoft
Access, SQL or the like as the users in the organisation do not have
access to them.

The only software standard on the machines is Microsoft Word, Excel and
PowerPoint. As such, I have needed to build the solution around the
software available. Microsoft Excel meets the requirement for the
keeping of the basic tables and the people who need to modify the data
understand how to work with that program.

The only problem is currently it is set-up with-out protection so those
that shouldn't have access do, which causes a number of frustrations.

If you have any further ideas on how to secure the workbooks please let
me know.

Yours sincerely,

William Foster
 
R

RobinS

William,

Don't let him get to you. He's trolling. His aliases are Larry Linson,
punjab_tom, dbahooker, susiedba, and Aaron Kempf, just for future
reference.

Robin S.
 
L

Larry Linson

yeah well you can protect a workbook, tools, protection right?

i believe that it follows the same method as Access connection; you
would just need to embed the jet password into the connection string
and you shoudl be good to go

sorry to be a jerk

I just hate importing crap out of spreadsheets; since it never works
and because the data validation in Excel can be overridden using copy
and paste
 
W

William Foster

Larry,

No problems,

I will look into the Access reference material to see if I can find
something there.

Yours sincerely,

William Foster
 
P

Paul Clement

¤ Good morning all,
¤
¤ I want to password protect a Microsoft Excel Workbook containing all my
¤ reference tables for a program, so that I can place the workbook in a
¤ central location that is accessible by all, but so they can not wreck
¤ it.
¤
¤ I am accessing the workbook via an OleDbConnection through the
¤ System.Data.OleDb framework.
¤
¤ I have looked a few different help items and newgroups posts, but they
¤ relate to Microsoft Access, not Microsoft Excel.
¤
¤ I would have thought it would have been as easy as
¤ Connenction.Password(“XXXX”); but unfortunately it does not appear to be
¤ that simple.
¤
¤ Any assistance you may be able to provide would be greatly appreciated

Unfortunately the data access methods do not support an Excel password.

The only option for a password protected Excel file is automation (using the Excel object model).


Paul
~~~~
Microsoft MVP (Visual Basic)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top