I wrote a program that creates a set of data that is displayed in an Excel spreadsheet. I originally used the jexcel library to write data to a file, but I would like to update the program so that it can check whether to create a ".xls" or ".xlsx" file and then write to the appropriate document type. Apache POI seems to be the best option in terms of writing the ".xlsx" file, but any ideas on determining the correct file type?
I could just select the user when naming the file, but this seems like extra work for the user, and I assume that there are users who do not know what type of file they want.
Any ideas?
In addition, I assume that the OS is windows, and the user has an excel version, in other cases I just select the default file type.
java file-type excel ms-office version
scaevity May 31 '11 at 21:51 2011-05-31 21:51
source share