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

Java½âÊÍExcelÊý¾Ý£¨jxl.jar°üµÄʹÓã©

»ù±¾²Ù×÷
Ò»¡¢´´½¨Îļþ
ÄâÉú³ÉÒ»¸öÃûΪ“²âÊÔÊý¾Ý.xls”µÄExcelÎļþ£¬ÆäÖеÚÒ»¸ö¹¤×÷±í±»ÃüÃûΪ“µÚÒ»Ò³”£¬´óÖÂЧ¹ûÈçÏ£º
/*
* Created on Dec 30, 2007
*
* To change the template for this generated file go to
* Window>Preferences>Java>Code Generation>Code and Comments
*/
package JExcelTest.standard;

import java.io.*;
import jxl.*;
import jxl.write.*;

/**
* @author Ken
*
* To change the template for this generated type comment go to
* Window>Preferences>Java>Code Generation>Code and Comments
*/
public class CreateXLS {

public static void main(String[] args) {
try {
//open file.
WritableWorkbook book = Workbook.createWorkbook(new File("d:/Test.xls"));

//create Sheet named "Sheet_1". 0 means this is 1st page.
WritableSheet sheet = book.createSheet("Sheet_1", 0);

//define cell column and row in Label Constructor, and cell content write "test".
//cell is 1st-Column,1st-Row. value is "test".
Label label = new Label(0, 0, "test");
//add defined cell above to sheet instance.
sheet.addCell(label);

//create cell using add numeric. WARN:necessarily use integrated package-path, otherwise will be throws path-error.
//cell is 2nd-Column, 1st-Row. value is 789.123.
jxl.write.Number number = new jxl.write.Number(1, 0, 789.123);
//add defined cell above to sheet instance.
sheet.addCell(number);

//add defined all cell above to case.
book.write();
//close file case.
book.close();
} catch (Exception e) {
e.printStackTrace();
}
}
}
±àÒëÖ´Ðк󣬻áÔ


Ïà¹ØÎĵµ£º

sql 2005 ´æ´¢¹ý³Ì·ÖÒ³ java ´úÂë

 create PROCEDURE pagelist
@tablename nvarchar(50),
@fieldname nvarchar(50)='*',         
@pagesize int output,--ÿҳÏÔʾ¼Ç¼ÌõÊý
@currentpage int output,--µÚ¼¸Ò³
@orderid nvarchar(50),--Ö÷¼üÅÅÐò
@sort int,--ÅÅÐò·½Ê½£¬1±íʾÉýÐò£¬0±íʾ½µÐòÅÅÁÐ ......

Java 5.0 ·ºÐÍÖ® ʹÓ÷ºÐÍͳһ´«ÈëµÄ²ÎÊýÀàÐÍ

package Demo;
// ʹÓ÷ºÐÍͳһ´«ÈëµÄ²ÎÊýÀàÐÍ
class Info28<T> {
private T var; // ´ËÀàÐÍÓÉÍⲿ¾ö¶¨
public T getVar() {
return this.var;
}
public void setVar(T var) {
this.var = var;
}
public String toString() { // ¸²Ð´ObjectÀàÖеÄtoString()·½·¨
return this.var.toString(); ......

Java 5.0 ·ºÐÍÖ® Java·ºÐ͵ÄǶÌ×ÉèÖÃ

package Demo;
// Java·ºÐ͵ÄǶÌ×ÉèÖÃ
class Info31<T, V> { // ½ÓÊÕÁ½¸ö·ºÐÍÀàÐÍ
private T key;
private V value;
public Info31(T key, V value) {
this.setKey(key);
this.setValue(value);
}
public void setKey(T key) {
this.key = key;
}
public void setValue(V value) {
this. ......

javaÃÀ»¯½çÃæ°ü

µ¼ÈëÅäÖÃjar°ü substance.jar
È»ºóÔÚframeµÄÖ÷º¯Êý ¼ÓÈëÈçÏ´úÂë
 JFrame.setDefaultLookAndFeelDecorated(true);
   JDialog.setDefaultLookAndFeelDecorated(true);
   try {
   UIManager.setLookAndFeel(new org.jvnet.substance.skin.SubstanceModerateLookAndFeel()) ; ......

ʹÓÃObjectSNMPµÄjavaÀý×Ó

ÏÂÃæµÄÀý×Ó£¬¾ÍÊÇʹÓÃObjectSNMP»ñÈ¡RFC1213-MIBµÄÀý×Ó£ºÆäÖеÄsystemºÍifTable¶ÔÏó¾ÍÊǶÔÓ¦µÄSNMP MIBÖеÄsystem×éºÏinterfaceÖеÄifTable±í¡£
class TestMibMapping
{
SNMPAPI snmpapi;
SNMPNodeParam nodeParam;
public TestMibMapping()
{
try
{
/**
......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ