File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Determining the File Format

 
Monu Tripathi
Rancher
Posts: 1369
1
Android Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A friend of mine is working on light weight client library(for Android Mobile platform) for working with MS-Excel files. He wants to target BIFF and Office 2003 XML formats first.

Question: How to determine the format of an xls file(biff or XML)?

Thanks.
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The office 2003 XML formats consist of an actual XML file - so trying to parse it (and not getting an exception) would indicate that it is in XML format.

Are people still using that format? My impression was that the Office 2007 format (which is a ZIP file) was now mainly being used, if not still the old binary format.

I don't think anything that handles the binary Office formats will be able to be called "light-weight" - it's quite a complex format.
 
Monu Tripathi
Rancher
Posts: 1369
1
Android Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf: Many thanks for reply.

I think his ultimate goal is to go for OOXML format which is used in office 2007 but he is unsure of how to ZIP the xml created in Office compression format.

Can you please advise?
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
He doesn't need to ZIP it, he needs to UNZIP it. That's where the java.util.zip package comes in.
 
Monu Tripathi
Rancher
Posts: 1369
1
Android Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
UnZip, while reading the (OOXML formatted) file and Zip, when writing right? He is confused about writing to a zip stream...sorry for not making it clear in the earlier post.
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You said this was for an Android application, right? So he should use something that's available in Android - like the java.util.zip package, which can both zip and unzip.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic