Originally posted by: BEA123
I have been trying to get a connection with an excel sheet. I was able to run it a few times and then it stopped working. The error I receive is type: OPL Problem Marker and it tells me to contact IBM. I know it occurs when I try to connect to the excel sheet because when I remove the code it runs fine. Here is my .dat code. I think the issue might be with something office is doing that prevents the connection from occurring...
****partial model code***
range cargo=1..n;
range comps=1..m;
float profit[cargo]=...;
float weight[cargo]=...;
float volume[cargo]=...;
float weight_cap[comps]=...;
float space_cap[comps]=...;
***.dat code***
SheetConnection my_sheet("Excel_Import_practice.xlsx");
profit from SheetRead(my_sheet,"profit");
weight from SheetRead(my_sheet, "weight");
volume from SheetRead(my_sheet,"volume");
weight_cap from SheetRead(my_sheet,"weight_cap");
space_cap from SheetRead(my_sheet,"space_cap");
x to SheetWrite(my_sheet,"results");
#DecisionOptimization#OPLusingCPLEXOptimizer