Originally posted by: G.L.
Hi,
I'm trying to write my results in a spreadsheet.
Here is the part where things do not seem to work out:
SheetConnection sheet("Results.xlsx");
d to SheetWrite(sheet,"A1:Z500"); //The range here is bigger than what I need for the purpose of explaining the problem.
d is d
http://1..10http://1..72.
If I give a range bigger than what I need, I get "Exception from IBM ILOG Concert: excel: range does not fit the dimensions of the array".
I have to give a range which fits EXACTLY with "d" to make this work (i.e. 10 X 72).
What I don't understand, is that in "help" on SheetWrite, they have this to say:
"When using sheetWrite to write to named ranges, the size of the range does not have to match the size of the data you are writing to Excel. If the set is smaller, then only the top most cells will be filled.
If you try to write more data than the range can accommodate, then you receive the error message: "Exception from ILOG Concert: excel: range is not wide enough to write the set"."
I tried using a named range bigger than what I needed, and I get the exact same problem.
Is there any way that I am NOT forced to "plan" the size of my results? Because "d" will NOT ALWAYS be 10 X 72.
Thanks!
Gabriel
#DecisionOptimization#OPLusingCPLEXOptimizer