Decision Optimization

 View Only
  • 1.  Write cplex result in Excel spreadsheet

    Posted Wed July 04, 2018 10:42 AM

    Originally posted by: oubax


    Hi, 

    I am trying to write the result of my cplex code, in excel spreadsheet (2013) using the example: 

    
    SheetConnection sheetData("C:\\ILOG_Files\\myExcelFile.xls");
    prods to SheetWrite(sheetData,"Product");
    

     But the problem is when i run cplex, the code read from excel but it can not write, and I'm receiving message " there no registered OLE editor that can open the file".

    Thank you.

     


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Write cplex result in Excel spreadsheet

    Posted Wed July 04, 2018 10:49 AM

    Hi,

    do you use Windows and do you have excel installed ?

    regards


    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: Write cplex result in Excel spreadsheet

    Posted Wed July 04, 2018 11:01 AM

    Originally posted by: oubax


    Yes of course, excel 2013 and cplex 12.8 in  windows 7.


    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: Write cplex result in Excel spreadsheet

    Posted Wed July 04, 2018 12:20 PM

    Hi,

    just to be sure, can you try to run the excel configuration in the oil example ?

    regards


    #CPLEXOptimizers
    #DecisionOptimization


  • 5.  Re: Write cplex result in Excel spreadsheet

    Posted Wed July 04, 2018 01:18 PM

    Originally posted by: oubax


    it doesn't work, message error : impossible to save in oilsheet.xls 


    #CPLEXOptimizers
    #DecisionOptimization


  • 6.  Re: Write cplex result in Excel spreadsheet

    Posted Wed July 04, 2018 02:56 PM

    Ok and what if you close the excel sheet before calling opl

    ?

    regards
     


    #CPLEXOptimizers
    #DecisionOptimization


  • 7.  Re: Write cplex result in Excel spreadsheet

    Posted Wed July 04, 2018 03:05 PM

    Originally posted by: oubax


    I have already tried this, in this case i am not receiving any error but the data is not written.

    I think the problem is that i don't have the cplex Add-Ins in Excel !!!

    Thank Alex for your efforts


    #CPLEXOptimizers
    #DecisionOptimization


  • 8.  Re: Write cplex result in Excel spreadsheet

    Posted Thu July 05, 2018 12:09 AM

    Hi,

    you get the error "there no registered OLE editor that can open the file"

    when you ry to open the file or when you run your OPL model ?

    regards


    #CPLEXOptimizers
    #DecisionOptimization


  • 9.  Re: Write cplex result in Excel spreadsheet

    Posted Thu July 05, 2018 11:27 AM

    Originally posted by: oubax


    when i run my OPL model.


    #CPLEXOptimizers
    #DecisionOptimization


  • 10.  Re: Write cplex result in Excel spreadsheet

    Posted Thu July 05, 2018 11:29 AM

    Hi,

    can you try with a clean excel file ?

    Just to be sure you do not have a lock on the file

    regards


    #CPLEXOptimizers
    #DecisionOptimization


  • 11.  Re: Write cplex result in Excel spreadsheet

    Posted Thu July 05, 2018 12:35 PM

    Originally posted by: oubax


    Even with a new excel file, this is the error, "sorry it's in french"


    #DecisionOptimization