An xlsm file is an OOXML type file, and uses XSSF.

An xls file is a BIFF binary file, and uses HSSF.

You can convert from xlsm to xlsx, but not to xls without copying cell by cell.

Regards,
Dave

On Sep 5, 2011, at 5:30 PM, dpront wrote:

> Hi!
> 
>  Is Apache POI capable of converting an xlsm file into a xls file?  Is
> there some sort of formatting before saving in POI, because when I try to
> read an xlsm file and writes it as xls file, the program worked fine but
> when I open the xls file, I got an error saying, "The file you are trying to
> open, "*.xls", is in a different format than specified by the file
> extension.  Verify that the file is not corrupted nd is from a trusted
> source before opening the file.  Do you want to open the file now?" and when
> I save it and open it again, the same error still prompts.
> 
> 
> Thanks.
> 
> --
> View this message in context: 
> http://apache-poi.1045710.n5.nabble.com/read-xlsm-and-write-to-xls-tp4772585p4772585.html
> Sent from the POI - User mailing list archive at Nabble.com.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to