[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-glpk] [Fwd: Re: result.xlsx out with GLPK]
From: |
glpk xypron |
Subject: |
Re: [Help-glpk] [Fwd: Re: result.xlsx out with GLPK] |
Date: |
Wed, 07 Sep 2011 22:28:32 +0200 |
Hello Stefan,
> the syntax i did try is:
>
> table result {i in PRODUCTS, j in TRAINS, k in POSITIONS} OUT "iODBC"
> 'DRIVER={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm,
> *.xlsb);DBQ=.\result.xlsx;READONLY=FALSE'
> 'INSERT INTO [result$] VALUES (PRODUCTS, TRAINS, POSITIONS)' :
> i ~ PRODUCTS, j ~ TRAINS, k ~ POSITIONS;
>
The INSERT statment should be
'INSERT INTO [result$] (PRODUCTS, TRAINS, POSITIONS) VALUES (?,?,?);'
If there is no question mark the whole string is considered to be a
table name by the ODBC driver in GLPK.
In the example above 'result' has to the name of a worksheet with the
values PRODUCTS, TRAINS, POSITIONS in cells A1 to C1.
GLPK for Windows comes with file glpk-4.46/examples/sql/sudoku_excel.mod.
I have added an example with DROP TABLE, and CREATE TABLE to
http://en.wikibooks.org/w/index.php?title=GLPK/ODBC#Microsoft_Excel
Best regards
Xypron
--
NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie!
Jetzt informieren: http://www.gmx.net/de/go/freephone