On Tue, Jul 14, 2009 at 12:09 AM, Byron Foster<[email protected]> wrote: > On Jul 13, 2009, at 11:44 , tl56 wrote: > >> Hello >> I am new to velocity so please excuse me if this is a foolish question, >> but >> I have a foreach loop and I'd like to display the data within an excel >> sheet(exporting data to excel)like the following >> 20 20 40 50 instead of >> 20 >> 20 >> 40 >> 50. >> My code: >> #foreach($row in $data) >> <Row> >> <Cell><Data ss:Type="Number">$row.year</Data></Cell> >> </Row> >> #end >> I can only display it vertically right now. >> Thank you in advance. > > This question is more appropriate for the user list, not the development > list. > > Since you are not generating raw text, the presentation of the data has > little to do with Velocity. In your above example you seem to be generating > XML. The interpreter of this XML, maybe Excel in this case, will determine > how the data is displayed. I would begin your research there.
though, i would guess something like: <Row> #foreach($row in $data) <Cell><Data ss:Type="Number">$row.year</Data></Cell> #end </Row> --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
