Jsp to formatted Excel

response.addHeader(“Content-disposition”, “attachment; filename=export.xls” );
<html xmlns:o=”urn:schemas-microsoft-com:office:office”
.numWithoutDec {mso-number-format:”\#\,\#\#0″;text-align:right;}
.numWith2Dec {mso-number-format:Standard;text-align:right}
.date {mso-number-format:”mm\/dd\/yyyy\;\@”}
<table x:str border=”1″>
<th>Number 1</th>
<th>Number 2</th>
<td x:str=”abcd”></td>
<td x:num=”12345.67″ class=”numWithoutDec”></td>
<td x:num=”12345.67″ class=”numWith2Dec”></td>
<td x:num=”36230″ class=”date”></td>


Date number 36230 is the days between 01/01/1900 and 03/11/1999

1 Comment »

  1. Arya Stark said

    Thanks for your post :) But I want to something, how can I show numbers like “987.569.256,69”, that is, it should be like dot,dot and comma.

RSS feed for comments on this post · TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: