title: #Tablesaw #Java When exported to csv, the table is reduce to only the last element of the list
body: <p>I self learn Java, and I am trying to do some programs for work.
  As in the title,
  the Table looks fine.
  But when I export to Csv only the last element is saved.</p>
  
  <p>I must have made a mistake somewhere.
  Your help will be strongly appreciated.</p>
  
  <pre><code>    public void listInsideFolder(String nomFile) throws Exception {
      File file = new File(nomFile);
      File[] listOfFiles = file.listFiles();
  
      List&lt;String&gt; Adresses = new ArrayList&lt;&gt;();
      List&lt;String&gt; Names = new ArrayList&lt;&gt;();
  
      for (int i = 0; i &lt; listOfFiles.length; i++) {
          if (listOfFiles[i].isFile()) {
              Adresses.add(listOfFiles[i].getAbsolutePath());
              Names.add(listOfFiles[i].getName());
              }
  
          StringColumn column0 = StringColumn.create("Names", Names);
          StringColumn column1 = StringColumn.create("Addresses",Adresses);
  
          Table t = Table.create();
  
          t.addColumns(column0);
          t.addColumns(column1);
  
        // System.out.println(t);
         // System.out.println(column0);
          // System.out.println(Names);
  
          t.write().csv("C:\\Users\\user\\Desktop\\Dossier\\Floweriest.csv");
  
          Adresses.clear();
          Names.clear();
          t.clear();
          column0.clear();
          column1.clear();
      }
  }
  </code></pre>