How can I make a web-based "table" select like a spreadsheet? (rectangular area vs row-wrap selection)

I want to make a table that displays on a webpage, but one requirement is to make it easy to copy and paste into a spreadsheet. Normal HTML tables selection behavior is obviously different from how a spreadsheet like Excel selects -- when you select multiple rows it wraps around instead of selecting a rectangular area. Is there any way to make HTML table behave like a spreadsheet in this regard, or is the only way to resort to a Flash table or something similar?