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

Export to excel

mengkoon007mengkoon007 Member Posts: 30 Contributor II
edited November 2018 in Help

Hi,

 

I have posted a process to the website and it is shown in table format.

 

I would like to allow end-user to be able to login and download the report to excel. 

 

Can someone kindly advice how can i go about doing? Thanks.

Tagged:

Answers

  • JEdwardJEdward RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 578 Unicorn

    Hello @mengkoon007,

     

    It's really simple.  Create a process that reads the data you are displaying as a table and use the Write Excel operator to write it into binary format.  Take this output (the purple line in the process below) and use this as the result port. 

     

    Next create a visualisation in your RapidMiner Server WebApp and select Binary as the output format. 

    Give it a nice name for the downloaded file in the options (for example myExcel.xlsx)

     

    You can use RawHTML in place of the text (where it says "Download" in the component options) and you'll be able to change it into a button pretty easily. 

     

    <?xml version="1.0" encoding="UTF-8"?><process version="7.3.000">
    <context>
    <input/>
    <output/>
    <macros/>
    </context>
    <operator activated="true" class="process" compatibility="7.3.000" expanded="true" name="Process">
    <process expanded="true">
    <operator activated="true" class="recall_from_app" compatibility="7.3.000" expanded="true" height="82" name="Recall from App" width="90" x="112" y="136">
    <parameter key="name" value="myTableData"/>
    </operator>
    <operator activated="true" class="write_excel" compatibility="7.3.000" expanded="true" height="82" name="Write Excel" width="90" x="447" y="136"/>
    <connect from_op="Recall from App" from_port="result" to_op="Write Excel" to_port="input"/>
    <connect from_op="Write Excel" from_port="file" 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>
Sign In or Register to comment.