title: Java implementing multiple threads (excel processing)
body: <p>So my application allows the user to select Microsoft excel file(s), usually having between 300 to 5000 rows. At times even larger than 5000. My question is would it be more efficient to use multiple threads in this scenario and what is the most effective way to then utilize the threads. Should each file have a thread of its own or what ? Also this is how each excel file is processed:</p>
  
  <pre><code>  Load file
    loop until eof
     iterate through rows and cells
     Assign each cell to variable x  
     concatenate required chars to begin and end of x
     Append x to y
    End loop
  
    Write y to text file
  </code></pre>
  
  <p><strong>EDIT CODE</strong></p>
  
  <pre><code> public class FileParse implements Callable&lt;String&gt;
   {
  
  private String fPath;
  private BufferedReader br;
  private String line;
  
  @Override
  public String call()
  {
  line = "";
  try{
          br = new BufferedReader(new FileReader(fPath));
  
          String sCurrentLine = "";
  
          while ((sCurrentLine = br.readLine()) != null) {
              line += sCurrentLine;
  
          }
      }catch(IOException exc){
          System.out.println("Cant load file");
  
      }
  
  
  return line;
  }
  
  
  public FileParse (String location)
  {
      br = null;
      fPath = location;
  
  }
  
  
  public static void main(String[] args)
  {
      ExecutorService executor = Executors.newFixedThreadPool(10);
  
      Callable&lt;String&gt; t1 = new FileParse("rsrc\\data12.txt");
      Callable&lt;String&gt; t2 = new FileParse("rsrc\\data13.txt");    
  
      Future&lt;String&gt; fut1 = executor.submit(t1);
      Future&lt;String&gt; fut2 = executor.submit(t2);
  
  
      try{
  
      System.out.println(fut1.get());
      System.out.println(fut2.get());
      }catch(InterruptedException | ExecutionException e){
  
      }
      executor.shutdown();
  }
  }
  </code></pre>