[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Questions on Excel COM object: "Visible" & "Activate" members of a _Work
From: |
Victor |
Subject: |
Questions on Excel COM object: "Visible" & "Activate" members of a _Worksheet object |
Date: |
Wed, 24 Oct 2018 04:27:56 -0500 (CDT) |
Hi,
I'm testing the script below on two Excel files. When I ran the script on
the first file, the script failed on the command /v = exlsheet1.visible/
with an error message
/error: com_get: unknown property/method name `visible'/
/exl = actxserver('Excel.Application')
path = 'C:\Users\test.xlsx'
exlFile = exl.workBooks.open(path,0,true)
WorkSheets = get(exl, 'Sheets')
exlsheet1 = WorkSheets.item(1)
v = exlsheet1.visible/
However, the same script was successfully executed on the 2nd Excel file.
The major difference between the two files is the that the first one
contains many macros and the second doesn't.
I also experimented with the method "Activate" of a _Worksheet object and
found the same issue. The command /exlsheet1.activate/ was executed
successfully on the second file but returned an error message on the first
file that contains many macros. Does anyone know how presence of macros
could affect the availability of the property/method (such as "Visible" and
"Activate") of a _Worksheet object?
--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html
- Questions on Excel COM object: "Visible" & "Activate" members of a _Worksheet object,
Victor <=