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

Excel worksheet loop using Macro

mikedmiked Member Posts: 21 Contributor II
Hi All - I'm having trouble with something I thought would be relatively easy and unable to get through it. I basically would like to "Read Excel" in a loop by using a macro to loop through however many sheets are in this file as they can change from month to month. The data structure is the same on each tab but each contain a different element.   If possible would also like to create an attribute using the tab name so I can track where the data came from. Any help would be appreciated. Thanks

Best Answers

  • MartinLiebigMartinLiebig Administrator, Moderator, Employee-RapidMiner, RapidMiner Certified Analyst, RapidMiner Certified Expert, University Professor Posts: 3,533 RM Data Scientist
    Solution Accepted
    Hi,

    Operator Toolbox has an operator called 'Read Excel Sheet Names' to get the names of the tabs. You can then loop over it and read each tab.

    Best,
    Martin
    - Sr. Director Data Solutions, Altair RapidMiner -
    Dortmund, Germany
  • MartinLiebigMartinLiebig Administrator, Moderator, Employee-RapidMiner, RapidMiner Certified Analyst, RapidMiner Certified Expert, University Professor Posts: 3,533 RM Data Scientist
    edited October 2021 Solution Accepted
    Hi,
    attached is an example process and excel file.
    Best,
    Martin
    - Sr. Director Data Solutions, Altair RapidMiner -
    Dortmund, Germany

Answers

  • mikedmiked Member Posts: 21 Contributor II
    Thank you! 
  • mikedmiked Member Posts: 21 Contributor II
    @mschmitz
    Hi Martin - Apologies but still struggling a little bit - would you be able to show a quick Loop example with the Read Excel Sheet Names operator? 
  • mikedmiked Member Posts: 21 Contributor II
    Thanks so much...appreciate the help! 
Sign In or Register to comment.