Reading Excel data Google Colab

Hello,
I am learning how to work with data in Excel files. I am able to get the results on the desktop version of AMPL. While colab gives me error.

%%ampl_eval
reset;
#load amplxl.dll;
model fpl.mod;
table Data IN "amplxl" "/content/drive/MyDrive/Colab Notebooks/Data/FLDE2.xlsx":
	ID <- [ID] , first,second, Position,
	ICT ~ "ict_index", Cost~"now_cost";
read table Data;

option solver cplexamp;

solve;

display {i in ID: y[i]<>0} (Name[i], Last[i], Position[i], Cost[i]);

display Z, CT;

Error:
line 6 offset 155
syntax error
context: ID ← [ID] , >>> first, <<< second, Position,
If I try to load amplxl.dll, it gives the following error. Error executing “load” command:
Cannot find library “amplxl.dll”.
Thank you

1 Like

Hi @muv2018,

Which modules are you installing in the notebook? For amplxl you need to install the module “plugins”. You can see an example at: amplxl — AMPL Colaboratory

Thank you, my code was missing the plugins module. It is fixed now.

1 Like