Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

jspÉú³ÉExcel±¨±íµÄ·½·¨

Excel±¨±íµÄ·½·¨£¬Ò»¸ö¹ý춼òµ¥£¬Ò»¸öÖ»ÄÜÓÃì¶windowƽ̨(ÒòΪʹÓÃjdbc-odbc bridge)£¬ÇÒÎÞ·¨Ê¹Óõ½ExcelÄÚ²¿µÄ¸÷ÖÖ¹«Ê½»òÊÇ·½·¨£¬Òò´Ë£¬½ñÌì½éÉÜÒ»¸öapache³öµÄÔª¼þ½ÐPOI£¬Ëü¿ÉÒÔÔÚUNIX»òwindowƽ̨´¦Àíword»òExcelµµ°¸£¬¶ø²»ÐèÒªÒÀ¿¿windowµÄcom£¬²¢ÇÒ¿ÉÉ趨´¢´æ¸ñ¸ñʽ¡¢ÁÐÓ¡¸ñʽµÈµÈ£»½ñÌìÎÒÀ´½éÉÜÆäÖÐÓйØ×ÊÁ϶ÁÈ¡¡¢ÐÂÔö¡¢Ð޸ļ°É¾³ýµÄ¹¦ÄÜ£¬Èô¸÷λÍøÓÑÑо¿ºÃÆäËûµÄ¹¦ÄÜ£¬Âé·³Email¸øÎÒ(ljj@mlc.edu.tw)£¬·ÖÏí¸ø´ó¼Ò£¡
Ò»¡¢ÐèÒªÓõĵµ°¸£ºjakarta-poi-1.8.0-dev-20020917.jar
¡¡¼¸ºõÿÌ춼ÓÐ1.8.0µÄ×îаæ(µ«·ÇÕýʽ°æ)£¬ÕýʽµÄ°æ±¾ÊÇ1.5.0
¡¡http://jakarta.apache.org/builds/jakarta-poi/nightly/
¡¡½«µµ°¸¸´ÖƵ½classpathËùÖ¸µ½µÄµØ·½
¶þ¡¢ÓÐÐËȤµÄÅóÓÑ¿ÉÒԲο¼
¡¡¡¡http://jakarta.apache.org/poi/
Èý¡¢ÏȽ¨Á¢Ò»¸ö½Ð×öbook1.xlsµÄExcelµµ£¬ÄÚÈÝÈçÏÂ
----------------------------------
ÏîÄ¿¡¡¡¡µ¥¼Û¡¡¡¡ÊýÁ¿¡¡¡¡ ºÏ¼Æ
CPU¡¡¡¡ 7000¡¡¡¡5¡¡¡¡¡¡¡¡35000
Ó²µú¡¡¡¡2500¡¡¡¡2¡¡¡¡¡¡¡¡5000
¼ÇÒäÌå¡¡1600¡¡¡¡3¡¡¡¡¡¡¡¡4800
----------------------------------
ÆäÖкϼƵÄÀ¸Î»ÊÇÉ趨¹«Ê½£¬µ¥¼Û*ÊýÁ¿
ËÄ¡¢×ÊÁ϶ÁÈ¡範Àý
<%@ page contentType="text/html;charset=MS950" import="java.util.*,java.io.*" %> ¡£
<%@ page import="org.apache.poi.poifs.filesystem.*,org.apache.poi.hssf.usermodel.*" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=MS950">
<title>¶ÁÈ¡Excelµµ°¸</title>
</head>
<body>
<table border="1" width="100%">
<%
FileInputStream finput = new FileInputStream(application.getRealPath("/") "book1.xls" );
//É趨FileINputStream¶ÁÈ¡Excelµµ
POIFSFileSystem fs = new POIFSFileSystem( finput );
HSSFWorkbook wb = new HSSFWorkbook(fs);
HSSFSheet sheet = wb.getSheetAt(0);
//¶ÁÈ¡µÚÒ»¸ö¹¤×÷±í£¬Ðû¸æÆäΪsheet
finput.close();
HSSFRow row=null;
//Ðû¸æÒ»ÁÐ
HSSFCell cell=null;
//Ðû¸æÒ»¸ö´¢´æ¸ñ
short i=0;
short y=0;
//ÒÔ³²×´迴Ȧ¶ÁÈ¡ËùÓд¢´æ¸ñ×ÊÁÏ
for (i=0;i<=sheet.getLastRowNum();i )
{
out.println("<tr>");
row=sheet.getRow(i);
for (y=0;y<row.getLastCellNum();y )
{
cell=row.getCell(y); .¡¡


Ïà¹ØÎĵµ£º

asp¡¢php¡¢asp.net¡¢jsp½éÉܼ°ÓÅȱµã±È½Ï


ÏÖÔÚÖ÷Á÷µÄÍøÕ¾¿ª·¢ÓïÑÔÎÞÍâºõasp¡¢php¡¢asp.net¡¢jspµÈ¡£
ÍøÒ³´Ó¿ªÊ¼¼òµ¥µÄhmtlµ½¸´ÔӵķþÎñÓïÑÔ£¬×ß¹ýÁË10¶à¸öÄêÍ·£¬¸÷ÖÖ¼¼Êõ²ã³ö²»Çµ¥¸öµÄÖ÷Á÷¼¼ÊõÒ²ÔÚ²»¶Ï·­Ðµİ汾£¬ÏÖÔÚ·ÖÎöϸ÷ÖÖÓïÑÔµÄÇø±ð¡¢ÓÅÊÆ¡¢ÁÓÊÆ¡¢¿ª·¢×¢ÒâÊÂÏ
HTML:µ±È»ÕâÊÇÍøÒ³×î»ù±¾µÄÓïÑÔ,ÿһ¸ö·þÎñÆ÷ÓïÑÔ¶¼ÐèÒªËüµÄÖ§³Ö,Ҫѧϰ,Õâ¸ö¿Ï¶¨ÊÇ¿ª ......

jsp»ù´¡ÖªÊ¶£¨ÕûÀí£©

¸Õ¿ªÊ¼Ñ§jsp£¬×öµÄÒ»µãÌý¿Î±Ê¼Ç¡£
1.jspÈý´óÖ¸Áî
 <%@ page ~~~~~~~~ %>
 <%@ include file=""%>
 <%@ taglib  url="" prfix=""%>
2.if(username.equals(""))
 out.println("ÐÕÃû²»ÄÜΪ¿Õ£¬Çë<a href=javascript:history.back()>·µ»Ø")£»
&&·ÀÖ¹Ö±½ÓÔÚä¯À ......

jsp url´«ÖÐÎÄ×î¼òµ¥ÕýÈ·µÄ·½·¨

ÔÚjspÖУ¬Èç¹ûÔÚurlÖд«µÝÖÐÎÄʱ»á³öÏÖÂÒÂ룬ÔÚÍøÉϹØÓÚÕâÒ»ÎÊÌâµÄ½â¾ö·½·¨Î廨°ËÃÅ£¬µ«¶¼²»ÊǺÜ×àЧ£¡Æäʵ½â¾ö·½·¨·Ç³£¼òµ¥£º µÚÒ»²½£º±àÂ루ÒÔ´«µÝµÄ²ÎÊýΪstrΪÀý£© ÔÚ´«µÝÊý¾ÝÇ°½«str½øÐбàÂëJava.net.URLEncoder.encode(str) µÚ¶þ²½£º½âÂë ÔÚ»ñÈ¡Êý¾Ý¶Ë½«µÃµ½µÄÊý¾Ý½øÐнâÂë new String£¨str.getBytes("ISO8859_1")£© ......

jsp request sessionµÈ¶ÔÏó Ïê½â


jsp request session
µÈ¶ÔÏó

Ïê½â
 
תÕß×¢£º´ËÎÄ×ܽá½ÏΪÏêϸ£¬ÖµµÃ²Î¿¼¡£µ«²¿·ÖÄÚÈݾ­¹ýÕûÀí£¬ÒÔÏÂÊÇÕýÎÄ¡£
 
1.request
¶ÔÏó
 
ÕâÁ½¸ö¶ÔÏóÊÇASPËùÌṩµÄÄÚÖöÔÏóÖÐ×î³£ÓõÄÁ½¸ö¡£ÔÚä¯ÀÀÆ÷£¨»òÆäËûÓû§´úÀí£©ºÍWeb·þÎñÆ÷Ö®¼ä£¬ÇëÇóÓëÏìÓ¦Öз¢ÉúµÄÐÅÏ¢½»Á÷¿ÉÒÔͨ¹ýASPÖеÄÁ½¸öÄÚÖöÔÏóÀ´½øÐÐ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ