FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Excel Open Password
Posts: 933
Joined: Sun Oct 09, 2005 01:05 PM
Excel Open Password
Posted: Tue Mar 18, 2008 06: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)
Posts: 234
Joined: Tue Oct 25, 2005 12:39 AM
Try
Posted: Wed Mar 19, 2008 01:22 AM
Posts: 933
Joined: Sun Oct 09, 2005 01:05 PM
Excel Open Password
Posted: 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)
Posts: 933
Joined: Sun Oct 09, 2005 01:05 PM
Excel Open Password
Posted: Wed Mar 19, 2008 01: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)

Continue the discussion