I am trying to get excel workbook name from filename (full file name), to get active worksheet using workbookGetActiveSheet. However, the filename is not passing into the workbook parameter of WorkbookGetActiveSheet. Please assist with how to get workbook or worksheet from File name.
When you open a workbook using the connector, you are required to pass it a file name. I am not sure I understand your question as that would be too obvious of an answer. Would you please clarify what you are looking for?
I have tried the attached 2 options to get the worksheet name from filename, which is not working and I understand why its not working, because the workbook name is not getting passed. How can I get this right. This is my first time with RPA and Pega so please excuse me for my lack of knowledge.
In order to open a workbook, you must supply the path to the workbook that you wish to open. By doing that, you'd know which workbook you were trying to open. You wouldn't open a workbook and then ask the connector "which workbook did I open". You would instead open a workbook and then perform work on it. If your workbook is located in "C:\Temp\MyWorkbook.xlsx", then that is what you supply to the Open method (or the Workbook property of the connector and then call the overloaded Open method without any parameters).
I have attached a sample solution along with two screenshots showing how I got to the ActiveWorksheetName property.