Excel Open Password

Excel Open Password

Postby Jeff Barnes » Tue Mar 18, 2008 6:41 pm

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 16.11, xHarbour 1.2.3, Bcc730)
User avatar
Jeff Barnes
 
Posts: 929
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada

Try

Postby fleal » Wed Mar 19, 2008 1:22 am

fleal
 
Posts: 234
Joined: Tue Oct 25, 2005 12:39 am
Location: México, DF

Postby Jeff Barnes » Wed Mar 19, 2008 12:38 pm

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 16.11, xHarbour 1.2.3, Bcc730)
User avatar
Jeff Barnes
 
Posts: 929
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada

Postby Jeff Barnes » Wed Mar 19, 2008 1:08 pm

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 16.11, xHarbour 1.2.3, Bcc730)
User avatar
Jeff Barnes
 
Posts: 929
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 47 guests