The example [transp3.mod](https://ampl.com/BOOK/EXAMPLES/EXAMPLES2/transp3.mod) + [transp3.dat](https://ampl.com/BOOK/EXAMPLES/EXAMPLES2/transp3.dat) from the AMPL book has the following definitions: ``` set ORIG; set DEST; set LINKS within {ORIG,DEST}; var Trans {LINKS} >= 0; ``` The data for `LINKS` is a subset of the origin-destination pairs. A 2D spreadsheet table of the `Trans` variables can be specified equivalently as ``` table Transp3 OUT "amplxl" "2D" "Transp3.xlsx": {(i,j) in LINKS} -> [ORIG,DEST], Trans[i,j]; ``` or ``` table Transp3 OUT "amplxl" "2D" "Transp3.xlsx": [ORIG,DEST], Trans; ``` But `write table Transp3;` fails with this error: ``` Error writing table Transp3 with table handler amplxl: Could not write 2D data ``` When `"2D"` is removed from either _table_ statement, the corresponding 1D table is written correctly.
Activity
nfbvs commentedon May 26, 2020
Fixed in e1e3342. Published in https://github.com/ampl/tables/tree/0.1.5.