Decision Optimization

 View Only
  • 1.  Read/write to Excel on a Mac Computer

    Posted Fri October 04, 2019 10:36 AM

    Originally posted by: JPatrick


    Hi, 

    I am teaching a course using OPL but my students are running into a snag because they do not appear to be able to read and write to excel when they are using a Mac computer.  Is this true?  Is there a workaround?

    Jonathan


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: Read/write to Excel on a Mac Computer

    Posted Fri October 04, 2019 01:06 PM

    Hi,

    indeed the SheetWrite / SheetRead team only work with Windows.

    You could turn your spreadsheet into csv files and then read csv and write csv as a workaround

    regards

    PS:

    Do not hesitate to log a wish in Aha https://ibm-data-and-ai.ideas.aha.io/?project=CPLEX


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 3.  RE: Read/write to Excel on a Mac Computer

    Posted 14 days ago
    One solution is to use a virtual machine running Windows, and access Excel files through the virtual machine. Another solution is to use a third-party library, such as Apache POI, to read and write Excel files in a platform-independent manner.

    ------------------------------
    Vishvajit das
    ------------------------------



  • 4.  RE: Read/write to Excel on a Mac Computer

    Posted 13 days ago
    Hi,

    other workaround : call some python from OPL

    Example : https://github.com/AlexFleischerParis/oplexcel/blob/main/readwithoutsheetread.mod

    in

    Excel, Rocket science and optimization



    ------------------------------
    [Alex] [Fleischer]
    [Data and AI Technical Sales]
    [IBM]
    ------------------------------