Jump to content

_excelbookopen passing the password


Recommended Posts

People,

I have an excel spreadsheet (2003). It is password protected for modify. I have achieved this by Tools->Options, Security tab, putting a password in 'Password to modify'. Save the sheet.

When the sheet is re-opened, you are prompted for a password. This is ok.

The problem is with: _excelbookopen

I pass the password in the function but the prompt for password still opens. I need the sheet to open without the prompt.

$excel = _excelbookopen($full_path, 1, false, "", "password")

What am I doing wrong?

Link to comment
Share on other sites

Just guessing here, but to start I would try (in case opening the file sees Read before Write):

$excel = _excelbookopen($full_path, 1, false, "password", "password")

What version of Excel btw

[font='Comic Sans MS']Eagles may soar high but weasels dont get sucked into jet engines[/font]

Link to comment
Share on other sites

AHA!

As yours worked, something is wrong with mine. Its an .xlsx. So there is conversion going on as you open and close; and this is clearly undermining the _excelbookopen. I resaved as .xls and it works a treat.

Thank you people.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...