export html table ke dalam bentuk excel

Filed in Meroyan , Programming , jsp 0 comments

korang kadang-kadang mesti terpikir macam mane nak export html kepada dalam bentuk excel. sebab korang mesti ada nak buat reporting dalam excel kan?

so macam ni.

korang fetch dari database data dan letakkan dia dalam bentuk html table

so korang buat lah satu jsp file contoh name generateExcel.jsp
generateExcel.jsp

<TABLE>
<TR><TD>2</TD></TR>
<TR><TD>3</TD></TR>
</TABLE>

then lepas dah ada file tu. korang edit folder tu then tambah coding cam kat bawah ni

Response.ContentType = “application/vnd.ms-excel”
<TABLE>

<TR><TD>2</TD></TR>

<TR><TD>3</TD></TR>

</TABLE>

Related posts:

  1. convert dari excel kepada mysql
  2. fetch database guna join
  3. JSP tutorial
  4. simpledateformat
  5. sending mail using jsp
Posted by h@fr|z   @   31 January 2010 0 comments
Tags : , , ,

Share This Post

RSS Digg Twitter StumbleUpon Delicious Technorati

0 Comments

No comments yet. Be the first to leave a comment !
Leave a Comment

Previous Post
«
Next Post
»
G-scale designed by Make Your Own Website In conjunction with Web Hosting   |   Watch Movies Online   |   Computer Repair