abstract Sheet getSheet(int index) Gets the specified sheet within this workbook As described in the accompanying technical notes, each call to getSheet forces a reread of the sheet (for memory reasons). abstract Sheet getSheet(java.lang.String name) Gets the sheet with the specified name from within this workbook. abstract java.lang.String[] getSheetNames() Gets the sheet names abstract Sheet[] getSheets() Gets the sheets within this workbook.
public class outputExcel { private HSSFWorkbook workbook ;
private HSSFSheet sheet ;
private HSSFCell cell ;
private HSSFRow cellRow ;
private FileOutputStream fos ;
private JTable table ;
public outputExcel(){ workbook = new HSSFWorkbook();//设置工作薄
Gets the specified sheet within this workbook As described in the accompanying technical notes, each call to getSheet forces a reread of the sheet (for memory reasons).
abstract Sheet getSheet(java.lang.String name)
Gets the sheet with the specified name from within this workbook.
abstract java.lang.String[] getSheetNames()
Gets the sheet names
abstract Sheet[] getSheets()
Gets the sheets within this workbook.
private HSSFSheet sheet ;
private HSSFCell cell ;
private HSSFRow cellRow ;
private FileOutputStream fos ;
private JTable table ;
public outputExcel(){ workbook = new HSSFWorkbook();//设置工作薄
sheet = workbook.createSheet();//设置工作薄
workbook.setSheetName(0, "sheet1", HSSFWorkbook.ENCODING_UTF_16);//设置sheet
好像不能设置你要问的这个问题,