public class first_history 
{
public void read_BOM()
{
try 
{
ArrayList array=new ArrayList();
String filename="D:\\test\\test.xls";
FileInputStream BOM=new FileInputStream("D:\\test\\test.xls");
HSSFWorkbook wb_bom=new HSSFWorkbook(BOM);
HSSFSheet sheet_bom=wb_bom.getSheetAt(0);
int row=sheet_bom.getLastRowNum();
int column=sheet_bom.getRow(0).getPhysicalNumberOfCells();
String dir_name="D:\\test\\dwg";
File path_dwg=new File("D:\\test\\dwg");
for(int i=1;i<=row;i++)
{
HSSFRow row_bom=sheet_bom.getRow(i);
HSSFCell cell_bom=row_bom.getCell(0);
String str=cell_bom.getStringCellValue().replace(".", "");
if(!str.equals(""))
{
String str1=getfile(path_dwg,dir_name,str);
array.add(str1);
}
else
{
array.add("");
}
}
write_BOM(array,filename,sheet_bom,wb_bom);
BOM.close();

catch (FileNotFoundException e) 
{
e.printStackTrace();

catch (IOException e) 
{
e.printStackTrace();
}
}
private void write_BOM(ArrayList array, String filename, HSSFSheet sheetBom, HSSFWorkbook wbBom) 
{
try {
HSSFRow row=null;
HSSFCell cell=null;
System.out.println(array.size());
for(int i=0;i<array.size();i++)
{
row=sheetBom.createRow(i);
cell=row.createCell(3);
cell.setCellType(HSSFCell.CELL_TYPE_STRING);
cell.setCellValue(array.get(i).toString());
}
FileOutputStream out_bom = new FileOutputStream("D:\\9250-NE-0924\\test.xls",true);
wbBom.write(out_bom);
out_bom.close();
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}

}
请问下,如何将处理好的数据填写回原来的excel中