ExcelPrepHTML.pm

C

cate

misc - this has got to be the place.

Sorry if this is outside the limits of a perl question, but has anyone
ever worked with HTML, preparing it for an Excel HTML import? We are
sending HTML to the client via

$Response->AddHeader("Content-Type","application/vnd.ms-excel");
$Response->AddHeader("Content-
Disposition","attachment;filename=Export2Excel_${filename}.xls");
$Response->BinaryWrite($postContent);

But the rendering in Excel is terrible. Is there a perl
ExcelPrepHTML.pm out there? I wish I knew more about the Excel import
rules, but I don't. Hoping someone else does; then stuck it all in a
module.

I see some code out there that use OLE to manipulate the workbook, but
this is strictly a hand off.

Thank you
 
J

John Bokma

cate said:
misc - this has got to be the place.

Sorry if this is outside the limits of a perl question, but has anyone
ever worked with HTML, preparing it for an Excel HTML import? We are
sending HTML to the client via

$Response->AddHeader("Content-Type","application/vnd.ms-excel");
$Response->AddHeader("Content-
Disposition","attachment;filename=Export2Excel_${filename}.xls");
$Response->BinaryWrite($postContent);

But the rendering in Excel is terrible. Is there a perl
ExcelPrepHTML.pm out there? I wish I knew more about the Excel import
rules, but I don't. Hoping someone else does; then stuck it all in a
module.

I see some code out there that use OLE to manipulate the workbook, but
this is strictly a hand off.

Does it have to be HTML?
 
C

cate

Does it have to be HTML?

No, but I'd rather just scoot over what I'm given. It's basically the
tables we're after. I suppose we could strip it down but we never
know exactly what we're getting.
 
C

ccc31807

But the rendering in Excel is terrible.  Is there a perl
ExcelPrepHTML.pm out there?  I wish I knew more about the Excel import
rules, but I don't.  Hoping someone else does; then stuck it all in a
module.

The xlsx format is pure XML. This means that you can write a script
that generates ASCII and Excel 2007 will render it natively.

To see what I mean, take an Excel file, change the xlsx extension to a
zip extension, and then unzip the file.

Obviously, generating an Excel file this way is extremely difficult,
but it IS possible. Better IMO is to generate files in simple CSV
format which Excel also opens natively -- except that this excludes
formatting and formulas.

CC
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,215
Messages
2,571,113
Members
47,715
Latest member
ReeceTaren

Latest Threads

Top