The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here

Reading xlsm files

listslists Member Posts: 39 Maven
edited November 2018 in Help

In MS Excel spreadsheets with macros/VBA enabled, have to be saved as so called xlsm - files.

Is there a solution available to read those files with the excel-reader-operator (only the data, not the VBA part)?

 

Thank you.

Tagged:

Answers

  • Thomas_OttThomas_Ott RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 1,761 Unicorn

    If the data is in a worksheet, then yes. If the data gets generated somehow from the VBA script, then probably not.

  • listslists Member Posts: 39 Maven
    Good evening,

    my Excel reader operator in RM only understands xls- and xlsx-files.
    So how is it done?
  • Thomas_OttThomas_Ott RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 1,761 Unicorn

    I was reading online somewhere that the xlsm files are kind of XML like. Can't guarentee that it'll work but try loading it with the Read XML operator. Just select "all files" when you import it and give it try. 

  • listslists Member Posts: 39 Maven

    Thank you Thomas, If I do so, RM tells something about invalid XML. Meanwhile I write out xlsx - files for RM via VBA. But it's a little bit anoying to do this within an automation pipeline with n files.

     

    As developer (not an Java-expert) I could imagine that this implementation could be an relatively easy task, if a all-in-one library is used (simply add another extension here and there). My guess is, a sheet stays as sheet, regardless which format is used.

     

    The advantage of Rapidminer-xlsm compatibility is obvious. It would provide greater standard- interoperability between MS Excel and RM, without the need to convert everything produced in Excel on pro grade level in other languages like VBA.

     

    Thanks god there is already an Excel writer in RM, which is an awesome opportunity.

  • Thomas_OttThomas_Ott RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 1,761 Unicorn

    This might be a job for some Groovy Script, which I'm in the process of learning so I'm not help there.  Maybe @BalazsBarany has some experience in this. . 

  • BalazsBaranyBalazsBarany Administrator, Moderator, Employee-RapidMiner, RapidMiner Certified Analyst, RapidMiner Certified Expert Posts: 955 Unicorn

    Did you try to read your Excel files with Read Excel? At a customer, we process .xlsm files with RapidMiner all the time. They're just standard .xlsx files but with macros.

  • listslists Member Posts: 39 Maven

     

     

    In my RM, no Read Excel operator nor Read Excel with Format operator understands .xlsm files.

    Is this a kind of 'Schmarn'?

    @BalazsBarany do we talk about the same RM-version (7.4.000)?

  • BalazsBaranyBalazsBarany Administrator, Moderator, Employee-RapidMiner, RapidMiner Certified Analyst, RapidMiner Certified Expert Posts: 955 Unicorn

    It worked for a long time before 7.4.

     

    Maybe there are different kinds of .xlsm files and yours aren't compatible. The ones I processed are quite simple.

     

  • listslists Member Posts: 39 Maven

    Then it could be a version thingy. I use the latest RM- and Excel versions.

    Worth to investigate by the RM-team.

  • MarkAdamsMarkAdams Member Posts: 2 Learner II

    I have the same issue trying to read data from any XLSM file, I always get: "Error loading sheet content. Reason: Unable to recognize OLE stream."

  • MarkAdamsMarkAdams Member Posts: 2 Learner II

    I have found what appears to work, using the Read Excel operator...

Sign In or Register to comment.