On May 26, 4:06 am, rmeichhorn <
rmeichh...@gmail.com> wrote:
> What I would like is some sort of flush method, which will write the
> headers of the XLS file out. It only needs to be a few bytes. I just
> need something to get the browser to prompt to save. Once the user
> hits save they can go do something else in the browser again, and let
> the browser's download manager take over.
>
> Not knowing anything about the structure of the XLS file, it this at
> all possible?
Hi Richard,
An Excel file is a binary file within a binary file. It contains
several interlinked checksums and changing even one byte can cause it
to become corrupted.
Nevertheless, you could send the first 8 bytes (see below) which
identify the file and which don't change to the browser, then write
the Excel data to a file and when it is finished send the rest of the
data minus the first 8 bytes.
cfd0 e011 b1a1 e11a
However, I'd imagine that there are more elegant Html/Javascript or
server side solutions that you could implement such as having an
intermediate page telling the user that the file was being generated,
and them streaming it when it is ready.
John.
--