I found a solution, but i will accept other working answers
Problem
When passing an empty string as password the excel consider it as nothing. So it ask for a password and show the dialog.
Solution
The solution is to pass a single quotation as a password, excel will consider it as empty string. If workbook is not password protected it will open, else it will throw the following exception
The password you supplied is not correct. Verify that the CAPS LOCK key is off and be sure to use the correct capitalization
The code will be:
m_xlWrkb = m_xlWrkbs.Open(strFile, Password:="'")
Note
In microsoft excel, single quotation on the beginning of a value is used to force text formatting.
example; '0
is readed as a text of value 0
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…