Jump to content
Sign in to follow this  
hazed

Excelcom.au3 - findout if spreadsheat is in Readonly mode

Recommended Posts

hazed

I need to update a shared Spreadsheet. Unfortunately other's may have it opened already. Using Excelcom.au3 I open, update and get out. But sometimes when i open it it is in a readonly mode, if it is i need to do something else. Is there a easy way to find out at or shortly after opening a spreadsheat with excom.au3 if one has Read/Write access.?

Share this post


Link to post
Share on other sites
big_daddy

Try this...

#include <ExcelCOM_UDF.au3>

$sFilePath = @ScriptDir & "\Test.xls"

$oWorkbook = _ExcelBookOpen($sFilePath)

If $oWorkbook.ReadOnly Then
    MsgBox(0, "", "Your workbook is in read only mode.")
EndIf

ExcelCOM_UDF.au3

Edited by big_daddy
Added link for library

Share this post


Link to post
Share on other sites
alsolh

Try this...

#include <ExcelCOM_UDF.au3>

$sFilePath = @ScriptDir & "\Test.xls"

$oWorkbook = _ExcelBookOpen($sFilePath)

If $oWorkbook.ReadOnly Then
    MsgBox(0, "", "Your workbook is in read only mode.")
EndIfoÝ÷ Úêå

Share this post


Link to post
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
Sign in to follow this  

×