in reply to Parsing Excel Files while maintaining format

Hello,

Well, I have this website that lets us download excel files. To me, this is the only data source I have to publish.

Now, I can't just offer the excel files for my users to dl nor can I make a script that saves each excel file as html and then have a little perl script handle the output of those .html files generated.

The thing is, I can only publish certain parts of the excel file. For example, publish rows 2a to 5a. This is why I need Spreadsheet::ParseExcel. It handles the receiving of certain parts of the excel file pretty well.

Now as to the first reply, I do know that Spreadsheet::ParseExcel has a format and font class. But it can't retreive it all. For example a cell with the format of "general" can either be align left or right. Also cells with a border style outline can not be intepreted since theres no format for it. Also the width, height, spacing of cells can not be retreived either.

I think I can only parse an excel file and format it into a html table to a certain limit.

Perhaps I can take a excel file and use Spreadsheet::ParseExcel to parse the certain rows and columns, then make a new spreadsheet, and save as .html file?

If I find a solution to display "exact detail format from an excel file", I'll post back.

Cheers,
Larry
  • Comment on Re: Parsing Excel Files while maintaining format

Replies are listed 'Best First'.
Re^2: Parsing Excel Files while maintaining format
by Hue-Bond (Priest) on Oct 07, 2006 at 10:58 UTC
    The thing is, I can only publish certain parts of the excel file. For example, publish rows 2a to 5a.

    Then, another approach would be copy the file to another .xls and then remove from it all information that shouldn't be published. That way, you wouldn't have to deal with HTML, formatting and such, and your users would get an xls file identical to the original, just "censored".

    --
    David Serrano

      Thats actually a good idea.

      I'll have to ask for permission first, not sure if they will let users dl .xls files i created from their source vs. viewing content from web where theres in exchange we display a small ad of theirs. But I do see this way as much more convenient and probably the best solution.

      Cheers,
      Larry