By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,506 Members | 2,282 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,506 IT Pros & Developers. It's quick & easy.

password protect exported .xls and import it!

P: n/a
I have used outputTo to export a copy of a table out of access into
excel. I was wondering if there is anyway to set a password on this
within the code so that it is read only in .xls format?

I was also hoping that there might be a away of importing a password
protected excel file into a table in access where the password is
known. I have searched help and can't see anything and also I couldn't
find the answer here as yet. I hope someone can help.
Thanks in advance.
Nov 13 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
mi********@hotmail.com (MissiMaths) wrote in message news:<75**************************@posting.google. com>...
I have used outputTo to export a copy of a table out of access into
excel. I was wondering if there is anyway to set a password on this
within the code so that it is read only in .xls format?

I was also hoping that there might be a away of importing a password
protected excel file into a table in access where the password is
known. I have searched help and can't see anything and also I couldn't
find the answer here as yet. I hope someone can help.
Thanks in advance.


I'll take question 2, Bob... Check Carl Prothman's website for a
connection string to Excel.

Look here (watch the wrap):
http://www.able-consulting.com/MDAC/...oviderForExcel
Nov 13 '05 #2

P: n/a
so it can't be done programmatically then??? any ideas on the first
question about exporting a table and protecting it!??????
Nov 13 '05 #3

P: n/a
As far as importing data from a protected Excel worksheet goes, I'd suggest
you just try it.
I had no trouble in Access 2000 when I tried.
No password is required, just as none is required when you open a
password-protected Excel sheet just to read it.

Now as to setting a password programmatically, this is not available under
OutputTo. You can think of OutputTo as a wizard, which does a number of
steps for you, but won't do things that aren't in its steps.
The more flexible (and more complex) method is to use Automation to open
the spreadsheet you have just created and set a password for it. Automation
is a bigger subject than will fit well in a newsgroup post, but I'm sure you
can find information on it in any intermediate to advanced Access text, and
probably in a number of other places as well.
Post back if you run into specific questions.

- Turtle
(with all due respect to Pieter, who has many very useful posts here, I
don't think the URL he suggested has much relevance to your issues.)
"MissiMaths" <mi********@hotmail.com> wrote in message
news:75**************************@posting.google.c om...
I have used outputTo to export a copy of a table out of access into
excel. I was wondering if there is anyway to set a password on this
within the code so that it is read only in .xls format?

I was also hoping that there might be a away of importing a password
protected excel file into a table in access where the password is
known. I have searched help and can't see anything and also I couldn't
find the answer here as yet. I hope someone can help.
Thanks in advance.

Nov 13 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.