Forum Discussion

FICO's avatar
FICO
Community Manager
4 years ago

Problem with reading from an Excel file

I tried to read data from an Excel file into Xpress IVE. However, I get the following error message:

"Mosel: E-22: I cannot open file `mmsheet.excel:data.xlsx' for reading (Invalid class string )."

I'm running Xpress IVE through Parallels on a MacBook. The Excel file is in the same directory as the mos file.

Thanks in advance, any help would be greatly appreciated.

2 Replies

  • FICO's avatar
    FICO
    Community Manager

    The error message 'Invalid class string' does not originate from Mosel.

    1. Have you tried what happens if you switch to using the I/O driver 'mmsheet.xlsx' in place of 'mmsheet.excel'? (Note that the driver 'mmsheet.excel' can only be used if an Excel installation is available.)
    2. Have you tried to run the same example from the command line:

    mosel mymodel.mos

  • FICO's avatar
    FICO
    Community Manager

    Thanks for the quick reaction! Changing to 'mmsheet.xlsx' solved the issue.