views:

172

answers:

1

Hi there,

I know we can send regular html files through the tubes and have the browser open them as Excel documents (you do that by changing http headers and the file name, then excel does the conversion). BUT, is it possible to get an HTML document show up in Excel with two Worksheets/Tabs?

Here's what I thought might work, but didn't quite get the job done:

<html>
  <body>
    <table>
      ....
    </table>
    <hr class='pageBreak' />      <= I thought perhaps this would divide stuff up
    <table>
      ....
    </table>
  <body>
</html>

Is there a worksheet tab or some kind of namespace I could ADD to html in order to create multiple worksheets?

EDIT Just curious if anyone else has any ideas... :-/

(I'm using Ruby, so if you know of a library that will convert HTML tags to an Excel worksheet object of some sort, that might work too)

+1  A: 

Try Ruby POI for generating OLE documents like Excel spreadsheets ( http://poi.apache.org/poi-ruby.html ).

The ExcelParser gem is wonderful if you need to handle importing .xls files as well ( http://raa.ruby-lang.org/project/parseexcel/ ).

Joe
Hi Joe. Thanks for the post, but I was trying to (at all costs, really) avoid programatically building a table. I appreciate the try though.
btelles