How to view all the methods available in Sys.OleObject COM object
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");
var xlsheet = excel.ActiveWorkBook.WorkSheets.Item(sheetName);
Please let me know if any more details are needed
Solved! Go to Solution.
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)).
[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