cancel
Showing results for 
Search instead for 
Did you mean: 

How to view all the methods available in Sys.OleObject COM object

SOLVED
Highlighted
Contributor

How to view all the methods available in Sys.OleObject COM object

Hi,

 

I am trying to interact with Excel file using a reference to the Excel.Application COM object. My original problem is that I want to get the code/method to get the current cell value type. For example, for a particular cell I want the current format type (General/Text/Custom). If it is in General format, I want to change to Text format. How can I do that? I have tried to use the Code completion to find available methods. I want to be able to view all the available methods using the Code Completion pop-up, but it doesn't load always. It acts like loading and then closes the pop-up without any results.

 

Example code snippet of how I interact with Excel COM object: 

let excel = Sys.OleObject("Excel.Application");
excel.Workbooks.Open(excelFile);
var xlsheet = excel.ActiveWorkBook.WorkSheets.Item(sheetName);

 

Please let me know if any more details are needed

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Hero

Re: How to view all the methods available in Sys.OleObject COM object

Best bet for you is to actually reference the documentation for the Excel.Application object (e.g., https://docs.microsoft.com/en-us/office/vba/api/excel.worksheet.activate(method)).


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available

View solution in original post

1 REPLY 1
Highlighted
Community Hero

Re: How to view all the methods available in Sys.OleObject COM object

Best bet for you is to actually reference the documentation for the Excel.Application object (e.g., https://docs.microsoft.com/en-us/office/vba/api/excel.worksheet.activate(method)).


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available

View solution in original post

New Here?
Join us and watch the welcome video:
Top Kudoed Authors