Excel Open Password

Post Reply
User avatar
Jeff Barnes
Posts: 912
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada
Contact:

Excel Open Password

Post by Jeff Barnes »

Hi Everybody,

There is an option in Excel to use a password to OPEN an excel file.

How can I set this password from within FWH and how would I then use it to open the file once it is set?
Thanks,
Jeff Barnes

(FWH 12.01, xHarbour 1.2.1, Bcc582)
fleal
Posts: 234
Joined: Tue Oct 25, 2005 12:39 am
Location: México, DF

Try

Post by fleal »

User avatar
Jeff Barnes
Posts: 912
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada
Contact:

Post by Jeff Barnes »

Excellent. Thanks fleal.

Now, how can I send then password when opening the file so the user does not have to enter it every time?

I found a post that mentions trying:

oExcel:WorkBooks:Open( cFileXls, , , , "password" )


But this did not work.

Any ideas?
Thanks,
Jeff Barnes

(FWH 12.01, xHarbour 1.2.1, Bcc582)
User avatar
Jeff Barnes
Posts: 912
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada
Contact:

Post by Jeff Barnes »

I've got it working.

To send the password you need to do the following:

oExcel:WorkBooks:Open( cFile,0,.f.,5,"password" )
Thanks,
Jeff Barnes

(FWH 12.01, xHarbour 1.2.1, Bcc582)
Post Reply