jspÏÂÔØ xlsÄÚÈÝÂÒÂë - Java / Web ¿ª·¢
ÎÒдÁËÒ»¸öjspÏÂÔØexcelÎļþµÄ¹¦ÄÜ£¬µ«·¢ÏÖÏÂÔغóÎļþµÄÄÚÈÝÈ«ÊÇÂÒÂ룬
ÎÒÎļþ µÄÄÚÈÝÈçÏ£º
head value
5600 hhhssMMMM123
7600 12345sdfsfsf
8600 12345sdfsfsf
jsp´úÂëÈçÏ£º
<%
String filename = "test.xls"
if(null==filepath){
filepath = "d:\\";
}
int i = 0;
response.setContentType("application/octet-stream;charset=uft-8");
response.setHeader("Content-Disposition",
"attachment;filename = "+filename);
java.io.FileInputStream fileInputStream = new java.io.FileInputStream(filepath+filename);
while((i= fileInputStream.read()) != -1){
out.write(i);
}
fileInputStream.close();
%>
ÏÂÔغó´ò¿ªÈ«ÊÇÕâЩ¶«Î÷£º
Sheet0聦ü聵 Topup ReportAmountMsisdn5600hhhssMMMM123760012345sdfsfsf8600ÿú
Çë¸ßÊÖ°ï½â¾öһϣ¬Ð»Ð»
response.setContentType("application/vnd.ms-excel;charset=uft-8");
Äã´ò¿ªÉú³ÉµÄexcel£¬¿´¿´ÄÇÀïÃæÊÇÂÒÂëÂð
response.setContentType("application/vnd.ms-excel;charset=uft-8");
¸Ä³ÉÕâÑù
response.setContentTy
Ïà¹ØÎÊ´ð£º
µ±ÖªµÀÒ»¸öÈÕÆÚ£¬ÈçºÎ°ÑÕâ¸öÈÕÆÚËùÔÚÑ®µÄÇ°ºóÁ½¸öÈÕÆÚÈ¡³ö
±ÈÈçÊäÈë20090905£¬¾ÍÊäÈë20090901 20090910
Êä³ö20090901 20090910
È¡µÃÌìÊýºó×÷Ò»ÏÂÅжÏÔÙ°ÑÕâ¸ö·½·¨ÓÃÏÂvoid set(int field, int value)
......
ʹÓÃjavaÔÚwindows7 32λÏÂÁ¬½ÓMSSQL¡£
Á½Ì¨»úÆ÷£¬windows7 32룬ÔÚ¿ØÖÆÃæ°åÀïÃæÈ«²¿ÉèÖÃÓïÑÔºÍÇøÓòÑ¡Ïenglish-unitedstates
ΨһÇø±ðÖ»ÓÐÔÚ°²×°SQL server 2008µÄʱºò Ñ¡ÔñµÄ×Ö·û¼¯²»Ò»Ñù£¬
exec sp_helpsor ......
ÎÒдÁ˸öjspÒ³Ã棬Ȼºó¸Ä¶¯ÁËһϣ¬¸Ä¶¯µÄÄÚÈݾÍÊÇÔÚjspÒ³ÃæµÄjsº¯ÊýÀï¼ÓÁ˸öalert()Óï¾ä£¬µ«ÊÇÎÒ·ÃÎÊÕâ¸öÒ³Ãæʱ£¬ËÀ»î¶¼ÊÇÔÀ´Ò³ÃæµÄÄÚÈÝ£¬ÎÒ¼ÓÁ˺ܶàalertº¯Êý»¹ÊÇû¸Ä¶¯Ç°µÄÒ³ÃæÄÚÈÝ£»tomcatÖØÆôÁË£¬Ò²ÖØв¿ÊðÕâ ......
id name datetime
1 a 2010-05-13 10:15:00
2 b 2010-05-14 09:10:00
3 d 2010-05-14 10:10:00
ÈçºÎ½«¾àÀëÄ¿Ç°×î½üµÄÄǸö¼Ç¼µÄname ¸üÐÂΪ¡°x¡±ÄØ
лл¿© °¡ ºÇºÇ
update table_n ......
ÓÃStruts2+Spring+Hibernate×öµÄÒ»¸öwebµÄERPСÏîÄ¿£¬×ܲ¿Ò»Ì¨·þÎñÆ÷£¨Êý¾Ý¿âÓëWeb·þÎñÆ÷ÔÚͬһ»ú×ÓÉÏ£©Êǵ¥¶À²¦ºÅÉÏÍøµÄ£¬Óë·Ö¹«Ë¾Ã»ÓÐÓþÖÓòÍøÏߣ¬Ó²¼þÌ«¹óÁË£¬ÆäËû¼¸¸öÊ¡Êзֹ«Ë¾¶¼À´·ÃÎÊÕâÒ»·þÎñÆ÷£¬¸Ð¾õºǫ́´ú ......