Decision Optimization

Decision Optimization

Delivers prescriptive analytics capabilities and decision intelligence to improve decision-making.

 View Only
  • 1.  SheetConnection

    Posted Thu July 12, 2018 11:21 PM

    Originally posted by: zileibinghen


    Good Day ,

    I am using the IBM ILOG CPLEX optimizaton Studio.  I want to read data from Excel. But there is a problem and how can I deal with it.

     

    My code:

    SheetConnection my_sheeet("formaldata.xlsx");
    ECapacity from SheetRead(sheet,"shuju!A24:B24");

    My problem:

    Com Exception:
        Code = -2,147,467,261
        Code meaning = 无效指针
    xlsFile = E:\CPLEX\transportation\formaldata.xlsx

     

     

    Thank you,

     

    Regards,


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: SheetConnection

    Posted Fri July 13, 2018 01:36 AM

    Hi,

    do you run on Windows ?

    What happens if you run the example oil that has a SheetRead ?

    regards


    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: SheetConnection

    Posted Fri July 13, 2018 02:37 AM

    Originally posted by: zileibinghen


    I run the example oil . There are two dat including oil.dat and oilsheet.dat. I can get the solution if I only have oil.mod and oil.dat.

    But only having oil.mod and oilsheet.dat can not generate the solution and make some other mistakes.


    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: SheetConnection

    Posted Fri July 13, 2018 02:48 AM

    Hi,

    so the issue is not with your model but with the SheetConnection.

    Have you installed Excel ?

    Do you run on MacOS ?

    regards


    #CPLEXOptimizers
    #DecisionOptimization


  • 5.  Re: SheetConnection

    Posted Sat July 14, 2018 10:12 AM

    Originally posted by: zileibinghen


    Hi

     

    I am sure I have installed excel and run on windows.

    Now I found a IBM ILOG OPL IDE Project File (.oplproject) in oil example including some config information.

    I modify and try to run some other examples successfully.

    Maybe it is a key issue. It is right?

    Thanks for your messages.

     

    regards


    #CPLEXOptimizers
    #DecisionOptimization