Save data to MS Excel or Word File

waelyafoozwaelyafooz Member Posts: 10 Contributor II
Hi all,
I tried to save the results of clustering to ms excel file but i face error .
Please have alook to this

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<process version="5.3.013">
  <operator activated="true" class="process" compatibility="5.3.013" expanded="true" name="Process">
    <process expanded="true">
      <operator activated="true" class="text:process_document_from_file" compatibility="5.3.000" expanded="true" height="76" name="Process Documents from Files" width="90" x="45" y="210">
        <list key="text_directories">
          <parameter key="oo" value="D:\Classic_subset\test"/>
        <process expanded="true">
          <operator activated="true" class="text:tokenize" compatibility="5.3.000" expanded="true" height="60" name="Tokenize" width="90" x="234" y="30"/>
          <connect from_port="document" to_op="Tokenize" to_port="document"/>
          <connect from_op="Tokenize" from_port="document" to_port="document 1"/>
          <portSpacing port="source_document" spacing="0"/>
          <portSpacing port="sink_document 1" spacing="0"/>
          <portSpacing port="sink_document 2" spacing="0"/>
      <operator activated="true" class="set_role" compatibility="5.3.013" expanded="true" height="76" name="Set Role" width="90" x="112" y="75">
        <parameter key="attribute_name" value="metadata_file"/>
        <parameter key="target_role" value="id"/>
        <list key="set_additional_roles"/>
      <operator activated="true" class="k_means" compatibility="5.3.013" expanded="true" height="76" name="Clustering" width="90" x="246" y="30">
        <parameter key="max_runs" value="1"/>
        <parameter key="max_optimization_steps" value="1"/>
      <operator activated="true" class="write_excel" compatibility="5.3.013" expanded="true" height="76" name="Write Excel" width="90" x="380" y="75">
        <parameter key="excel_file" value="C:\ssssss.xls"/>
      <connect from_op="Process Documents from Files" from_port="example set" to_op="Set Role" to_port="example set input"/>
      <connect from_op="Set Role" from_port="example set output" to_op="Clustering" to_port="example set"/>
      <connect from_op="Clustering" from_port="cluster model" to_op="Write Excel" to_port="input"/>
      <connect from_op="Write Excel" from_port="through" 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"/>


  • Options
    awchisholmawchisholm RapidMiner Certified Expert, Member Posts: 458 Unicorn

    The cluster operator outputs a model and an example set. The write excel operator works with example sets. The process you have is trying to write a cluster model as can be seen in this fragment of the XML
    <connect from_op="Clustering" from_port="cluster model" to_op="Write Excel" to_port="input"/>
    Change to the second output port from the cluster model which is an example set.


Sign In or Register to comment.