This Question is Possibly Answered

1 "correct" answer available (4 pts) 1 "helpful" answer available (2 pts)
3 Replies Last post: Jul 30, 2009 11:36 AM by Roman Kazmin  
  3 posts since
Jul 30, 2009
Currently Being Moderated

Jul 30, 2009 9:32 AM

JExcel corrupting after writing xls file!!!!!

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();

}

 

}

ne help would be appreciated !!!!!!!!!!!!


Roman Kazmin TeamDev Ltd. 154 posts since
Nov 21, 2008
Currently Being Moderated
1. Jul 30, 2009 10:40 AM in response to: Abhishek
Re: JExcel corrupting after writing xls file!!!!!

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.

 

Sincerely,
Roman
Roman Kazmin TeamDev Ltd. 154 posts since
Nov 21, 2008
Currently Being Moderated
3. Jul 30, 2009 11:36 AM in response to: Abhishek
Re: JExcel corrupting after writing xls file!!!!!

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



More Like This

  • Retrieving data ...