ÀûÓÃJAVA²Ù×÷EXCELÎļþ
JXL.JAR ²Ù×÷ExcelÎļþ¿ªÔ´°ü
ÕâÀï¼òµ¥½²Ð©ÏîÄ¿ÖÐÓõ½µÄһЩ·½·¨£¡£¨ÏîÄ¿µÄ»·¾³ÊÇStruts2 hibernate3 resin3 £©
// ExcelÎļþ´æ·Å·¾¶
String path = ServletActionContext.getServletContext().getRealPath("")+"userfiles\\train_excel\\text.xls";
// Éú³ÉExcelÎļþ
WritableWorkbook wwb = Workbook.createWorkbook(new File(path));
// Éú³ÉÒ»¸ö¹¤×÷±¡
WritableSheet ws = wwb.createSheet("Sheet 1", 0);
// ²»ÏÔʾExcelÏß¿ò
ws.getSettings().setShowGridLines(false);
//ÉèÖÃÁпí 0´ú±í0ÁС¢5´ú±íÁеĿí¶È
ws.setColumnView(0, 5);
// ÉèÖÃÐиß
ws.setRowView(0, 1000);
// ×ÖÌå
WritableFont font= new WritableFont(WritableFont.ARIAL, 12, WritableFont.NO_BOLD, false,UnderlineStyle.NO_UNDERLINE, Colour.BLACK);
// µ¥Ôª¸ñÑùʽ
WritableCellFormat cellFormat= new WritableCellFormat(font);
// ÉèÖõ¥Ôª¸ñµÄÄÚÈÝ×óÓÒ¾ÓÖÐ
cellFormat.setAlignment(Alignment.CENTRE);
// ÉèÖõ¥Ôª¸ñµÄÄÚÈÝÉÏϾÓÖÐ
cellFormat.setVerticalAlignment(VerticalAlignment.CENTRE);
// ÉèÖõ¥Ôª¸ñµÄ±ß¿ò £¨ÉÏÏÂ×óÓÒËùÓÐ,Ïß,ÑÕÉ«£©
cellFormat.setBorder(Border.ALL , BorderLineStyle.THIN ,Colour.GREY_40_PERCENT);
// ÉèÖõ¥Ôª¸ñ±³¾°É«
cellFormat.setBackground(Colour.YELLOW);
// ÉèÖÃ×Ô¶¯»»ÐÐ
cellFormat.setWrap(true);
// ÔÚµÚ2ÐУ¬µÚ1ÁÐ µ¥Ôª¸ñ²åÈë“ÐÕÃû”£¬ÑùʽΪcellFormat
ws.addCell(new Label(1,2,"ÐÕÃû",cellFormat));
// ÔÚµÚ4ÁУ¬0Ðе¥Ôª¸ñÌî³äÄÚÈÝΪ¿Õ
ws.addCell(new Blank(4,0));
// ʱ¼äÀàÐÍ ·½·¨(1) *×¢£ºµ±µ¥Ôª¸ñ¿í¶È±È½ÏСʱ¡¢½«ÏÔʾ####
SimpleDateFormat formatDate = new SimpleDateFormat("yyyy-MM-dd");
ws.addCell(new Label(0,0,formatDate.format(new Date()),cellFormat));
// ʱ¼äÀàÐÍ ·½·¨(2)
DateFormat df = DateFormat("yyyy-MM-dd");
jxl.write.DateTime labelDTF = new jxl.write.DateTime(1, 3, new java.util.Date(), cellFormat);
ws.addCell(labelDTF);
// ºÏ²¢0ÐУ¬µÚ1Áе½µÚ9Áеĵ¥Ôª¸ñ¡¢×¢£ºµ¥Ôª¸ñÖеÄÄÚÈÝÖ»ÓÐÒ»¸ö£¬ÆäËüµ¥Ôª¸ñ±ØÐëΪ¿Õ £¨×óÓҺϲ¢£©
ws.mergeCells(1, 0, 9, 0);
// ºÏ²¢1ÁУ¬µÚ0Ðе½µÚ0Ðеĵ¥Ôª¸ñ¡¢£¨ÉÏϺϲ¢£©
ws.mergeCells(1, 0, 1, 9);
//дÈëExel¹¤×÷±í¡¢Õâ²½²»³ÉÔòûÓÐÎļþÉú³É
wwb.write();
//¹
Ïà¹ØÎĵµ£º
2008 Äê 6 ÔÂ 24 ÈÕ
ÔÎĵØÖ·£º http://www.ibm.com/developerworks/cn/data/library/techarticles/dm-0806wangys/
±¾ÎĽéÉÜ IBM FileNet P8 4.0 Platform ÌṩµÄ Content Java API¡£Ê×ÏÈ¶Ô FileNet P8 Content Engine ºÍ API ½øÐиÅÒª½éÉÜ, ²¢ËµÃ÷ÁËһЩ»ù±¾¸ÅÄËæºóÏêϸ½éÉÜÁË FileNet Content EngineÌṩµÄ»ùÓÚ EJB ......
Basic concepts in OOP
Encapsulation:Òþ²ØʵÏÖ¹ý³Ì£¬¶ÔÍâÌṩ¹«¿ªÒ»ÖµĽӿڡ¢Ê¹Èí¼þÒ×ÓÚ¸üÐÂÓëά»¤¡£
Polymorphism£ºÒ»¸öÊÂÎï×Ô¶¯»ñµÃÁíÒ»ÊÂÎïµÄ״̬ÐÐΪµÄ»úÖÆ¡£
Inheritance£ºÒ»¸öÀà×Ô¶¯»ñµÃÁíÒ»¸öÀàµÄÊôÐÔ»òÕß·½·¨µÄ¹ý³Ì¡£
1.ÀàµÄ½á¹¹
ˈ̞
&nb ......
´ó¼ÒÔÚÈ¥²Î¼ÓÃæÊÔµÄʱºò£¬¾³£»áÓöµ½ÕâÑùµÄ¿¼Ì⣺¸øÄãÁ½¸öÀàµÄ´úÂ룬ËüÃÇÖ®¼äÊǼ̳еÄ
¹Øϵ£¬Ã¿¸öÀàÀïÖ»Óй¹ÔìÆ÷·½·¨ºÍһЩ±äÁ¿£¬¹¹ÔìÆ÷Àï¿ÉÄÜ»¹ÓÐÒ»¶Î´úÂë¶Ô±äÁ¿Öµ½øÐÐÁËij
ÖÖÔËË㣬ÁíÍ⻹ÓÐһЩ½«±äÁ¿ÖµÊä³öµ½¿ØÖÆ̨µÄ´úÂ룬ȻºóÈÃÎÒÃÇÅжÏÊä³öµÄ½á¹û¡£Õâʵ¼Ê
ÉÏÊÇÔÚ¿¼²éÎÒÃǶÔÓڼ̳ÐÇé¿öÏÂÀàµÄ³õʼ»¯Ë³ÐòµÄÁ˽⡣
ÎÒ ......
ÓÐʱºò£¬ÀàµÄͬһÖÖ¹¦ÄÜÓжàÖÖʵÏÖ·½Ê½£¬µ½µ×²ÉÓÃÄÇÖÖʵÏÖ·½Ê½£¬È¡¾öÓÚµ÷ÓÃÕß
¸ø¶¨µÄ²ÎÊý¡£ÀýÈçÔÓ¼¼Ê¦ÄÜѵÁ·¶¯Î¶ÔÓÚ²»Í¬µÄ¶¯ÎïÓв»Í¬µÄѵÁ··½Ê½¡£
public void train
(Dog dog){
//
ѵÁ·Ð¡¹·Õ¾Á¢£¬ÅŶӣ¬×öËã ......
Ò»¡¢PO:
persistant object
³Ö¾Ã¶ÔÏó,¿ÉÒÔ¿´³ÉÊÇÓëÊý¾Ý¿âÖеıíÏàÓ³ÉäµÄjava¶ÔÏó¡£×î¼òµ¥µÄPO¾ÍÊǶÔÓ¦Êý¾Ý¿âÖÐij¸ö±íÖеÄÒ»Ìõ¼Ç¼£¬¶à¸ö¼Ç¼¿ÉÒÔÓÃPOµÄ¼¯ºÏ¡£POÖÐÓ¦¸Ã²»°ü
º¬ÈκζÔÊý¾Ý¿âµÄ²Ù×÷¡£
¶þ¡¢VO
:value
objectÖµ¶ÔÏó¡£Í¨³£ÓÃÓÚÒµÎñ²ãÖ®¼äµÄÊý¾Ý´«µÝ£¬ºÍPOÒ»ÑùÒ²Êǽö½ö°üº¬Êý¾ ......