What is the difference between XSSF and HSSF


When we are doing the data driven testing we use excel file for the testdata. In the program we import Apache POI XSSF workbook  or HSSF workbook

What is the difference between them

Doctor Asked on August 20, 2014 in Selenium WebDriver.
Add Comment
  • 3 Answer(s)
    Best answer

    Hi Anu,

    Since office 2007 Microsoft has changed the office file formats (including excel and Word). All the formats prior to office 2007 were without x e.g .xls and .doc. Before 2003 file format was a Binary Interchange File Format.

    Since office 2007, Microsoft adopted a new file format which was tightly derived from XML file format. This new file format is called Office Open XML format. As it is Xml based format,  they added an X (from Xml) to the file extension. Hence we have .xlsx and .docx.

    While doing Java interoperability, for the  Open office xml format Java developers created a new parser and corresponding Object model was named XSSF.


    Professor Answered on August 20, 2014.
    Add Comment

    Hi anu,
    I have mentioned the difference between HSSF and XSSF below.

    HSSF (Horrible SpreadSheet Format) – reads and writes Microsoft Excel (XLS) format files. It can read files written by Excel 97 onwards; this file format is known as the BIFF 8 format. As the Excel file format is complex and contains a number of tricky characteristics, some of the more advanced features cannot be read.

    XSSF (XML SpreadSheet Format) – reads and writes Office Open XML (XLSX) format files. Similar feature set to HSSF, but for Office Open XML files.


    Doctor Answered on August 20, 2014.
    Add Comment

    hi anu
    we use HSSF when we have to use file of format
    but xssf is used for file formats  ” .xlsx”

    Vice Professor Answered on August 20, 2014.
    Add Comment
  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.