title: Inserting new column to an already existing excel file using jxl api
body: <p>I'm using jxl api for editing an existing excel file. 
  But when i try to add a new column and write the sheet its showing null pointer exception.
  The code that I'm using is as shown below :</p>
  
  <pre class="lang-java prettyprint-override"><code>File file = new File("d:\\test.xls");
  Workbook workbook;
  WritableWorkbook copy = null;
  if (file.exists()) {
  
      try {
          workbook = Workbook.getWorkbook(file);
          copy = Workbook.createWorkbook(new File("C:\\TEMP\\temp.xls"),
                  workbook);
      } catch (BiffException e) {
  
          e.printStackTrace();
      } catch (FileNotFoundException fnf) {
          fnf.printStackTrace();
  
      } catch (IOException e) {
  
          e.printStackTrace();
      }
  
  }   
  WritableSheet sheet = copy.getSheet(0);
  
  sheet.insertColumn(2); //this statement causes error  
                        //if I comment it the code works fine
  
  try {
      copy.write();
      copy.close();
  }
  catch(Exception e)
  {
  
      e.printStackTrace();
  }
  </code></pre>
  
  <p>Please help me to solve this problem and insert new column .</p>
  
  <p>I'm able to edit the single cells of excel successfully and write the file.</p>