Query about WorkbookFactory.create(input)

2015-10-28 Thread Rohit Cha
Does WorkbookFactory.create(input) can read both excel-2003 and excel-2007 with out any exception or do we need to use xssf and hssf seperately for each one FileInputStream input = new FileInputStream( "/Users/Desktop/Spice+tool.xls"); Workbook wb = WorkbookFactory.create(input); Sheet sheet

Re: Query about WorkbookFactory.create(input)

2015-10-29 Thread Mark Beardsley
Yes, WorkbookFactory will support both file formats. If you take a lok at this page - https://poi.apache.org/spreadsheet/converting.html - and then scroll down to the section entitled "New, generic SS Usermodel Code" you will see how to code so that both file formats can be handled seamlessly so to

Re: Query about WorkbookFactory.create(input)

2015-10-29 Thread Dominik Stadler
Hi, WorkbookFactory can open both file formats and will use the correct specific implementation internally automatically. As long as you stick to the Workbook, Sheet, Row, Cell interfaces (in contrast to XSSFWorkbook/HSSFWorkbook and related implementations), you should be able to work with both

Re: Query about WorkbookFactory.create(input)

2015-10-29 Thread Javen O'Neal
Adding one more thing: Here's the specific implementation: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/ss/usermodel/WorkbookFactory.java?revision=1704710&view=markup#l196 public static Workbook create(InputStream inp, String password) throws IOException, InvalidFormat

Re: Query about WorkbookFactory.create(input)

2015-10-29 Thread Rohit Cha
Can i know the some small "differences in some areas when one format supports things that the other does not." as it may be helpful to my work in future On Thu, Oct 29, 2015 at 1:26 PM, Dominik Stadler wrote: > Hi, > > WorkbookFactory can open both file formats and will use the correct > specif

Re: Query about WorkbookFactory.create(input)

2015-10-29 Thread Nick Burch
On Thu, 29 Oct 2015, Rohit Cha wrote: Does WorkbookFactory.create(input) can read both excel-2003 and excel-2007 with out any exception or do we need to use xssf and hssf seperately for each one FileInputStream input = new FileInputStream( "/Users/Desktop/Spice+tool.xls"); Workbook wb = Workboo

Re: Query about WorkbookFactory.create(input)

2015-10-29 Thread Dominik Stadler
Hi, Not sure myself, unfortunately we do not have a comprehensive list of differences that are mandated by the formats themselves, but they are not a lot and surely in areas usually not used a lot, mostly the newer XML based formats support a few additional things that were not available at the ti