title: Reading and writing XLSM spreadsheet containing macros in java
body: <p><strong>I am getting following exception while reading <code>XLSM</code> spreadsheet excel file in java</strong> :</p>
  
  <p><em>org.apache.poi.POIXMLException:        org.apache.poi.openxml4j.exceptions.InvalidFormatException: Package should      contain a content type part [M1.13]</em></p>
  
  <pre><code>    //My Code Look like
           String source="test.xlsm";
          File file = new File("D:\\file\\"+source);
          FileOutputStream fileOut = new FileOutputStream(file,false);
          FileInputStream fin = new FileInputStream(file);
          if(file.exists()){
            **Workbook workbook = new XSSFWorkbook(fin); // While Reading time i am getting exception here**
            XSSFSheet sheet = (XSSFSheet) workbook.getSheetAt(1);
          }
  </code></pre>