🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

"[SOLVED] How to swap attributes/column order for Excel output?"

scepxkoUser: "scepxko"
New Altair Community Member
Updated by Jocelyn
hello,

after a few intensive days deep into Rapidminer i managed to solve almost any complicated problem i had (xPath, crawl, filter, date format, regex, etc. thanks to this forum) but this simple one!

I am reading Excel files where the order of columns is : teaser / URL / title / time
I simply want to change this order into: time / title / teaser / URL

In the "Read Excel" operator, i tried to modify the "column index" values for the different attributes (ie. 0 for time, 3 for URL). No effect

I tried to change "attribute" to "label", "id", "weight"...No effect too.

I surely missed something somewhere...
Any help is appreciated!
Alex

Find more posts tagged with

Sort by:
1 - 1 of 11
    scepxkoUser: "scepxko"
    New Altair Community Member
    OP
    Accepted Answer
    Hello Dietrich,

    Thank you for your help. It worked perfectly.
    Below is the process that works for me.
    Thank you again!
    Alex
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <process version="5.2.001">
      <context>
        <input/>
        <output/>
        <macros/>
      </context>
      <operator activated="true" class="process" compatibility="5.2.001" expanded="true" name="Process">
        <process expanded="true" height="556" width="815">
          <operator activated="true" class="read_excel" compatibility="5.2.001" expanded="true" height="60" name="Read Excel (2)" width="90" x="45" y="165">
            <parameter key="excel_file" value="E:\Rapidminer\links_summary.xls"/>
            <list key="annotations"/>
            <list key="data_set_meta_data_information"/>
          </operator>
          <operator activated="true" class="work_on_subset" compatibility="5.2.001" expanded="true" height="76" name="Work on Subset (3)" width="90" x="179" y="165">
            <parameter key="attribute_filter_type" value="single"/>
            <parameter key="attribute" value="teaser"/>
            <process expanded="true">
              <connect from_port="exampleSet" to_port="example set"/>
              <portSpacing port="source_exampleSet" spacing="0"/>
              <portSpacing port="sink_example set" spacing="0"/>
              <portSpacing port="sink_through 1" spacing="0"/>
            </process>
          </operator>
          <operator activated="true" class="work_on_subset" compatibility="5.2.001" expanded="true" height="76" name="Work on Subset" width="90" x="313" y="165">
            <parameter key="attribute_filter_type" value="single"/>
            <parameter key="attribute" value="title"/>
            <process expanded="true" height="738" width="914">
              <connect from_port="exampleSet" to_port="example set"/>
              <portSpacing port="source_exampleSet" spacing="0"/>
              <portSpacing port="sink_example set" spacing="0"/>
              <portSpacing port="sink_through 1" spacing="0"/>
            </process>
          </operator>
          <operator activated="true" class="work_on_subset" compatibility="5.2.001" expanded="true" height="76" name="Work on Subset (2)" width="90" x="447" y="165">
            <parameter key="attribute_filter_type" value="single"/>
            <parameter key="attribute" value="time"/>
            <process expanded="true" height="738" width="914">
              <connect from_port="exampleSet" to_port="example set"/>
              <portSpacing port="source_exampleSet" spacing="0"/>
              <portSpacing port="sink_example set" spacing="0"/>
              <portSpacing port="sink_through 1" spacing="0"/>
            </process>
          </operator>
          <connect from_op="Read Excel (2)" from_port="output" to_op="Work on Subset (3)" to_port="example set"/>
          <connect from_op="Work on Subset (3)" from_port="example set" to_op="Work on Subset" to_port="example set"/>
          <connect from_op="Work on Subset" from_port="example set" to_op="Work on Subset (2)" to_port="example set"/>
          <connect from_op="Work on Subset (2)" from_port="example set" to_port="result 1"/>
          <portSpacing port="source_input 1" spacing="0"/>
          <portSpacing port="sink_result 1" spacing="0"/>
          <portSpacing port="sink_result 2" spacing="0"/>
        </process>
      </operator>
    </process>