# Excel -\> Cases where a password is required for writing and opening

**URL:** <https://forum.robusta.ai/t/excel-cases-where-a-password-is-required-for-writing-and-opening/432>\
**Category:** FAQ\
**Created:** [November 14, 2022, 6:25am UTC](https://forum.robusta.ai/t/excel-cases-where-a-password-is-required-for-writing-and-opening/432 "2022-11-14T06:25:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ilayda.ipar](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robusta.ai/ilayda.ipar/32/56_2.png) [@ilayda.ipar](https://forum.robusta.ai/u/ilayda.ipar)\
**Post date:** [November 14, 2022, 6:25am UTC](https://forum.robusta.ai/t/excel-cases-where-a-password-is-required-for-writing-and-opening/432/1 "2022-11-14T06:25:59Z")

</div>

Hello,

Two different passwords must be entered to open the excel file in a process and to operate it. You can make encrypted excel files completely passwordless with save as with VBScript, which I will convey below.

**If it requires a password both for opening and for typing;**

```auto
Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = false
objExcel.displayalerts=false
Set objWorkbook = objExcel.Workbooks.Open ("C:\RobustaJiraProjects\IP-606 ...\Test.xlsx",,True,,"123") 
Set objWorksheet1 = objWorkbook.Worksheets("page1")
objWorksheet1.SaveAs "C:\RobustaJiraProjects\IP-606 Sifreli Excel ile islem yapma\newTest.xlsx",,""
ReadOnly=False
IgnoreReadOnlyRecommended=true

objWorkbook.save
objWorkbook.close
objExcel.Quit()
Set objWorksheet1 = Nothing
Set objWorkbook = Nothing
Set ObjExcel = Nothing

```

**If there is a password only when opening;**

```auto
Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = false
objExcel.displayalerts=false
Set objWorkbook = objExcel.Workbooks.Open ("C:\RobustaJiraProjects\IP-838\Test2.xlsx",,,,"123qwe","123qwe",True,,True,True)
Set objWorksheet1 = objWorkbook.Worksheets("Sheet1")
objWorksheet1.SaveAs "C:\RobustaJiraProjects\IP-838\newTest.xlsx",,""
ReadOnly=False
IgnoreReadOnlyRecommended=true
objWorkbook.save
objWorkbook.close
objExcel.Quit()
Set objWorksheet1 = Nothing
Set objWorkbook = Nothing
Set ObjExcel = Nothing

```
