You can't do that with Javascript alone. You'll need some kind of
server-side processing that can create Excel formatted files. Just
simply exporting a file with Content-Type for Excel is not going to
give you a proper Excel file.

If you're using PHP, look into PEAR's Spreadsheet_Excel_Writer
package.
http://pear.php.net/package/Spreadsheet_Excel_Writer/

Where does the data from the HTML table come from? If it's from a
backend database, you can skip the Javascript and just use the
database and PHP (or whatever server-side scripting). If it's some
static HTML table, you'll use Javascript to parse the table to extract
the data, and send that back to the server.

On Feb 3, 11:46 am, Shankar <san...@gmail.com> wrote:
> <?php
> header("Content-type: application/vnd.ms-excel; name='excel'");
>
> header("Content-Disposition: filename=export.xls");
> header("Pragma: no-cache");
> header("Expires: 0");
>
> ?>
>
> I am trying to save a part of html table into an excel. I want to save
> partially inorder to omit images in the same html table. Ia m using
> the above code to save the table.
>
> Is there any way out to accomplish this?
>
> Thanking in advance for any tips or suggestions

Reply via email to