Trouble creating solution table and writing to Excel

set SURGERY; 
set ROOM;

param tour > 0 integer;

var Assign{SURGERY, ROOM, 1..tour} binary;

table assignment OUT "amplxl" "3D" "sol.xlsx":
    {SURGERY, ROOM, 1..tour} -> [s ~ SURGERY, r ~ ROOM, t~TOUR], Assign[s,r,t];

write table assignment;

I am getting the following error for the write table line:

error processing var Assign[...]:
	no data for set SURGERY

You show here only the beginning of an AMPL model:

set SURGERY; 
set ROOM;

param tour > 0 integer;

var Assign{SURGERY, ROOM, 1..tour} binary;

Before you can use write table to send the values of the variables to a spreadsheet, you need to define an objective function (using a minimize or maximize statement) and constraints (using subject to statements); then you need to read data for SURGERY, ROOM, and tour; and finally you need to set a solver, and invoke AMPL’s solve command to get optimal values for the Assign variables.

In particular, if you have not read data for the SURGERY set, you will get the “no data for set SURGERY” message when you try to execute write table.

If you are defining a complete model and are doing all of the steps described above, but you are still getting the “no data” message, then to get more help, reply with all of your files attached.