package dbToxml;
/**
* @author Alex
* @msg 把數據庫轉化為excel
*/
import java
import java
import java
import java
import jxl
import jxl
import jxl
import jxl
import jxl
import jxl
import jxl
public class Oracle_to_Excel {
ResultSet rs=null;
public void serch(){
//ConnOracle oracle=new ConnOracle();
String sql=
//ResultSet rs=oracle
WritableWorkbook book=null;
WritableSheet sheet=null;
try
{
//Excel獲得文件
Workbook wb=Workbook
book= Workbook
sheet=book
//sheet
//jxl
//sheet
//book
//book
}catch(Exception e)
{
System
}
int j=
try {
while(rs
int i=
sheet
sheet
sheet
sheet
//String date=rs
//sheet
j++;
}
} catch (RowsExceededException e) {
// TODO Auto
e
} catch (WriteException e) {
// TODO Auto
e
} catch (SQLException e) {
// TODO Auto
e
}
try {
book
book
} catch (WriteException e) {
// TODO Auto
e
} catch (IOException e) {
// TODO Auto
e
}
}
public static void main(String[] args) {
Oracle_to_Excel oratoex=new Oracle_to_Excel();
oratoex
}
}
From:http://tw.wingwit.com/Article/program/Java/hx/201311/26150.html