WRITING DATA TO EXCEL(Code)
import java.awt.Label;
import java.io.File;
import java.io.IOException;
import jxl.*;
import jxl.read.biff.BiffException;
import jxl.write.Number;
import jxl.write.WritableCell;
import jxl.write.WritableSheet;
import jxl.write.WritableWorkbook;
public class Jmeter {
public static void main(String asp[]) throws BiffException, IOException
{
Workbook workbook = Workbook.getWorkbook(new File("C:\\Frame11.xls"));
WritableWorkbook wbook1 = Workbook.createWorkbook(new File("C:\\Nitin.xls"));
Sheet sheet = workbook.getSheet(0);
Cell cell =sheet.getCell(0, 0);
Cell cell1 =sheet.getCell(0, 1);
Cell cell2 =sheet.getCell(0, 2);
String s = cell.getContents();
String s1 = cell1.getContents();
String s2 = cell2.getContents();
System.out.print("HEllo "+s+" "+s1+" "+s2);
WritableSheet ws = wbook1.createSheet("FIRSTSHEET", 0);
Number num = new Number(0, 1, 25.5285);
wbook1.write();
wbook1.close();
}
Subscribe to:
Post Comments
(
Atom
)
No comments :
Post a Comment