怎样在excel中插入一行,下面的代码是在excel2003中插入一行,而且是插在第一行上面,并在插入行中放入一个图片
/**
* 在Excle2003文档插入图片
* @author sha1064616837
* @param fileWordPath
* Excel文档绝对路径
* @param newText
* 需要插入的条形码图片的绝对路径
*/
public static boolean insertImage2Excel03(String fileExcelPath,
String fileImagePath) {
FileOutputStream fileOut = null;
BufferedImage bufferImg = null;
ByteArrayOutputStream byteArrayOut = new ByteArrayOutputStream();
FileInputStream fis = null;
try {
bufferImg = ImageIO.read(new File(fileImagePath));
//将一个图像写入outputStream
ImageIO.write(bufferImg, "jpeg", byteArrayOut);
HSSFWorkbook wb = null;
fis = new FileInputStream(new File(fileExcelPath));
wb = new HSSFWorkbook(fis);
HSSFSheet sheet1 = null;
//遍历该excel下的所有页签
for (int i = 0; i