- This is the code I use for my excel data. maybe It'll come in handy.
-
1. Retrieve the data from the Excel file:
let excelApp = Sys.OleObject("Excel.Application");
let workbook = excelApp.Workbooks.Open("path_to_your_excel_file");
let sheet = workbook.Sheets("Sheet1");
let data = sheet.Cells(1, 1).Value;
let appProcess = Sys.Process("Your_Application_Process_Name");
let window = appProcess.Window("Your_Window_Name");
let statusBox = window.FindChild("Your_Status_Box_Name");
statusBox.Click();
3. Optionally, add necessary delays or synchronization points before proceeding further.
4. Simulate typing the data into the Status box:
statusBox.Keys(data);
//Or for setItem
statusBox.setItem(data);
Make sure to replace "path_to_your_excel_file" with the actual path to your Excel file, "Sheet1" with the name of the sheet in your Excel file, "YourAppProcessName" with the actual process name of your application, and "Your_Status_Box_Name" with the proper name or identifier of the Status box in your application.
Please let me know if you encounter any issues or if there's any additional information I can provide to assist you further.