Is there any reason that the given code could corrupt the xls file that is being created
import java.io.*;
import java.util.Date;
import jxl.*;
import jxl.read.biff.BiffException;
import jxl.write.*;
import jxl.write.Number;
import jxl.write.biff.RowsExceededException;
public class write1 {
public void start1() throws IOException, WriteException, BiffException{
Workbook r = Workbook.getWorkbook(new File("F://myfile.xls"));
WritableWorkbook workbook = Workbook.createWorkbook((new File("F:\\Output.xls")),r );
// creates a workbook object inside java
WritableSheet s1 = workbook.createSheet("Client", 1);
// creates a sheet object using the workbook object and creates a sheet with the name clients in the second sheet in the workbook
Number n1 = new Number(0,1,232);
s1.addCell(n1);
workbook.write();
workbook.close();
}
}
Hello,
According to class names in your post I can say that you are using opensource jexcelapi project but not our JExcel library.This forum is intended for support of TeamDev products (www.teamdev.com) only.
To resolve this issue you need contacting with jexcelapi team on project web site: http://tech.groups.yahoo.com/group/JExcelApi/. Please address all your questions related to usage of jexelapi product to corresponding site of product owner. I hope this helps.
If you have any questions related to usage of our JExcel product, please let us know and we will be happy to help.
sorry about that !!!!!!!!!!
could you tell me where i could download the TeamDev JExcel library
sorry again!!!!!!!!!!!!
JExcel can be downloaded here: http://www.teamdev.com/jexcel/
In the JExcel Programmer's Guide you can find samples on how open, modify and save the file.
Sincerely,
Roman