Warning: Invalid argument supplied for foreach() in /home/e1rsbco/public_html/hafriz/wp-content/plugins/facebook-import-comments/classes/FacebookCommentImporter.php on line 185
Your browser (Internet Explorer 6) is out of date. It has known security flaws and may not display all features of this and other websites. Learn how to update your browser.
X
Post

export html table ke dalam bentuk excel

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

Leave a comment  

name*

email*

website

Submit comment