'JavaScript for Automation (JXA) Excel open workbook question

How do you open an Excel workbook using JavaScript for Automation?

let excelApp = Application("Microsoft Excel");  
let path = Path("/Users/me/Test.xlsx");
excelApp.openWorkbook(path);  

gets error 50 "parameter error".



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source