Reputation: 13
How can I read a tuple from excel on cplex by its index note the cell. I mean :
T from SheetRead(sheet,"'Data'!(0,0)");
Instead of :
T from SheetRead(sheet,"'Data'!A1");
I have tuple that can be longer or shorter between different simulation. The lenght is define by n. May I do a thing like :
T from SheetRead(sheet,"'Data'!(0,0):(0,n)");
thank have a good day
Upvotes: 1
Views: 209
Reputation: 5940
The answers to your questions can be found in the reference documentation of function SheetRead
:
SheetRead
can only be string literals. So you cannot use variables there.One option in your case would be to define a named range in the Excel sheets. For example, you can define a named range called "TupleData" in each of the different sheets and define that range to be of different dimension/location in different sheets. Then in the .dat
file you can write
T from SheetRead(sheet, "'Data'!TupleData");
Upvotes: 1