Creating a window panel to load excel file

I have written a procedure to create a window panel to load excel file as follows:

NewPanel
// Set the panel title
SetWindowTitle "Excel Loader Panel"
// Add a button to the panel for loading an Excel file
Button LoadExcelFile "Load Excel File"
 // Set the action for the LoadExcelFile button
ButtonAction LoadExcelFile {
  // Use the FileLoad command to load an Excel file
  FileLoad/T/D=data/F="*.xlsx"
}
 // Pack the panel to make it available for use
Pack

The procedure compiles with no error but when I run this code with Ctrl + Enter it says command Error expected wave name variable name or operation

Can someone help me out with this...

The commands "ButtonAction", "FileLoad", and "Pack" do not exist in the Igor Pro dictionary. Please explain how this can be Igor Pro code???

If I had to guess, perhaps the FileLoad command requires a destination wave designated in advance.

In the meantime, try also to edit your posting to put all the individual code lines into one code input segment.