-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Unpack COLtest.zip and execute include COLtest.run which reads two spreadsheet files in a loop using amplxl. The first file is read successfully (though with some invalid subscripts discarded), but the second one is rejected with a Could not extract sheet message:
ampl: include COLtest.run
Error at _cmdno 5 executing "display" command
(file COLtest.run, line 15, offset 271):
error processing param COL:
12 invalid subscripts discarded:
COL[1,'TA',5]
COL[2,'TA',5]
COL[3,'TA',5]
and 9 more.
COL [*,TA,*]
: 1 2 3 4 :=
1 2.14805 2.45592 3.23197 4.16625
2 2.39733 2.70252 3.4543 4.32747
3 2.64476 2.9441 3.66518 4.47475
4 2.88774 3.17831 3.8634 4.60845
5 3.12388 3.40311 4.04813 4.72913
6 3.35106 3.6168 4.21894 4.83749
7 3.5675 3.81807 4.37571 4.93433
8 3.7718 4.00602 4.51863 5.02052
9 3.96296 4.18012 4.64813 5.09695
10 4.14034 4.34018 4.76482 5.1645
11 4.30371 4.48632 4.86943 5.22402
12 4.45311 4.61892 4.9628 5.27634
13 4.58885 . . .
14 4.71148 . . .
15 4.82168 . . .
;
Error at _cmdno 7 executing "read_table" command
(file COLtest.run, line 14, offset 251):
Error reading table COL[2] with table handler amplxl:
Could not extract sheet
ampl:
The two spreadsheet files have the same amount of data of the same kind, but strangely, they are not the same size. When the second one is read into Excel and then saved, the error no longer occurs. However there is now another strange behavior, as the invalid subscripts from the second file are read into param COL rather than being discarded:
ampl: include coltest.run
Error at _cmdno 5 executing "display" command
(file coltest.run, line 15, offset 271):
error processing param COL:
12 invalid subscripts discarded:
COL[1,'TA',5]
COL[2,'TA',5]
COL[3,'TA',5]
and 9 more.
COL [*,TA,*]
: 1 2 3 4 :=
1 2.14805 2.45592 3.23197 4.16625
2 2.39733 2.70252 3.4543 4.32747
3 2.64476 2.9441 3.66518 4.47475
4 2.88774 3.17831 3.8634 4.60845
5 3.12388 3.40311 4.04813 4.72913
6 3.35106 3.6168 4.21894 4.83749
7 3.5675 3.81807 4.37571 4.93433
8 3.7718 4.00602 4.51863 5.02052
9 3.96296 4.18012 4.64813 5.09695
10 4.14034 4.34018 4.76482 5.1645
11 4.30371 4.48632 4.86943 5.22402
12 4.45311 4.61892 4.9628 5.27634
13 4.58885 . . .
14 4.71148 . . .
15 4.82168 . . .
;
COL [*,TA,*]
: 1 2 3 4 5 :=
1 2.07589 2.38393 3.16567 4.11694 5.0406
2 2.25301 2.56015 3.32684 4.23581 5.09418
3 2.42997 2.73457 3.48266 4.34759 5.14326
4 2.60581 2.90628 3.63261 4.45234 5.18816
5 2.7796 3.07445 3.77624 4.55021 5.22916
6 2.95047 3.2383 3.91321 4.64136 5.26657
7 3.11758 3.39715 4.0433 4.72602 5.30066
8 3.28019 3.55041 4.16636 4.80446 5.33169
9 3.43764 3.69758 4.28233 4.87694 5.35991
10 3.58936 3.83827 4.39123 4.94379 5.38555
11 3.73488 3.9722 4.49315 5.0053 5.40883
12 3.87383 4.09916 4.58825 5.0618 5.42996
13 4.00595 . . . .
14 4.13108 . . . .
15 4.24912 . . . .
;
ampl:
Metadata
Metadata
Assignees
Labels
No labels