Open .xls from CMD with password

fjruiz412

New Member
Joined
May 2, 2018
Messages
2
Hi

I need to open in CMD command line, a 2010 excel workbook with open password

same like this:

[FONT=&quot]C:\Program Files\Microsoft Office\OFFICE11\excel.exe [/FONT][FONT=&quot]C:\Documents and Settings\Paul\My Documents\libro1.xlsx password="1234"

I don´t Know how do this

thanks a lot

best regards[/FONT]
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
I did a little research and I don't believe it's possible to pass the password to Excel via command prompt.

However, there is a shorter way to start excel from the command prompt:

start excel.exe "C:\Documents and Settings\Paul\My Documents\libro1.xlsx"
 
Upvote 0
One way is to open a separate excel file with some auto-open VBA code to open your excel file with password-

Code:
[FONT=&quot]Sub Auto_Open()[/FONT]
[FONT=&quot]  Workbooks.Open Filename:="myfile.xls", Password:="mypassword"[/FONT]
[FONT=&quot]  ThisWorkbook.Close SaveChanges:=False[/FONT]
[FONT=&quot]End Sub
[/FONT]
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,849
Members
452,361
Latest member
d3ad3y3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top