See response below,


> Andy,
>
> I've tried what you said but it doesn't work :
>
> >If that doesn't work, take another step backwards.  Use POIFS to read
> >all the data in and write it back out uninterperated (just like you
> >found it).  You should NOT have to create a record in the Workbook.
>
> Let's take this basic example :
>
> POIFSFileSystem fs = new POIFSFileSystem(new FileInputStream("in.xls"));
> FileOutputStream out = new FileOutputStream("out.xls");
> fs.writeFilesystem(out);
> out.close();
>
> If "in.xls" is a clean MS Excel 2000 file (without macro) I can open the
> result file "out.xls" in Excel without problem.
>
> But if "in.xls" is the same file with one macro added, I can't open
> "out.xls" back in Excel, I get a weird error message : "...file cannot be
> accessed... read only file..." !
>
> But the "out" file size is exactly the same as the "in" file size !
>
> Shouldn't the output file be written back exactly as the source file ??? I
> mean at least with the same content ?
>
> Because I did a diff on the output of POIFSViewer and BiffViewer for both
> tests (with and without macro) and there are exactly the same !!!
>
> There must be something screwed up somewhere when the source file contains
> other stuff (like a macro) !

BiffViewer just views the file stream relating to the workbook so that
suggests there may actually be corruption in one of the other streams.

Andy: Know of any way to do a binary dump of a whole file?

-- Glen






--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to