Error reading table precio with table handler amplxl:

Hi @Laura_Rodriguez

Thank you for the provided information!

To load data from a table with one indexing set you just need the table declaration and the read command.
However, when you load data from a table with more than one indexing set, the data from the indexing sets must be loaded before.

In the case of table precio you have two indexing sets, G and T, so you first need to load the data for G and T and only than you can read table precio

table Tiempo IN "amplxl" "dtu.xlsx" "periods":
	T <- [T];

table Generacion IN "amplxl" "dtu.xlsx" "gen":
	G <- [G], pmax, pmin;

table precio IN "amplxl" "dtu.xlsx" "2D":
	[G, T], po;

read table Tiempo;
read table Generacion;
read table precio;

As precio is a 2D table you need to put the name G on top of the column. From the table declaration amplxl will deduce that the header of the table has elements of T and that the parameter that you are reading is po.

A quick read to this post might help understanding how amplxl and 2D tables work. amplxl documentation is available here.

Sample files attached example.zip (9.4 KB) with minor changes but also loading the prfl data.