Ask Your Question

Open password protected file via command line

asked 2017-12-27 06:44:49 +0200

arjereza gravatar image


Been trying to look at the list command line arguments in opening a Calc file in Libreoffice through command line but I could not find an argument for opening a password protected file. Can anyone tell me if this is possible and if so how to do this?


edit retag flag offensive close merge delete


Hello @arjereza,

Such a password parameter does not currently exist for the command line. I think that this is for safety reasons to ensure that the password is manually entered into the Password Dialog when the file opens.

With Regards, lib

librebel gravatar imagelibrebel ( 2017-12-27 08:19:11 +0200 )edit

Thanks for the response. Just wanted to be sure had a hunch it was not implemented due to security.

arjereza gravatar imagearjereza ( 2018-01-08 02:15:59 +0200 )edit

1 Answer

Sort by » oldest newest most voted

answered 2017-12-27 17:58:38 +0200

Jim K gravatar image

Write a macro that calls loadComponentFromURL with property Password. There is an explanation at

Then call the macro from the command line, as for example

edit flag offensive delete link more


Thanks. Will try this.

arjereza gravatar imagearjereza ( 2018-01-08 02:18:42 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2017-12-27 06:44:49 +0200

Seen: 1,482 times

Last updated: Dec 27 '17