call write() on the workbook.

call write() on the workbook.

Previous Home Next

 

In this part we will learn how to call write() method on the workbook.

For creating a workbook we have to use the jxl.write.WritableWorkbook as,
WritableWorkbook workbook=Workbook.createWorkbook(File file);

For writting the contents on the workbook thus created we have to import the jxl.write Class. This class contains the method i.e. write() method which is required for writting any type of data to the workbook.The general body of write() method is given by,

public void write()throws java.io.IOException, WriteException
This method creates a spreadsheet within a workbook using JExcel API. We can use this method on the above created workbook as,
workbook.write();
which will write all your data to the spreadsheet.


 For writting a data onto a spreadsheet we use the following the method,
public void write()throws java.io.IOException, WriteException
This method creates a spreadsheet within a workbook using JExcel API. We can use this method on the above created workbook as,
workbook.write();


 

Previous Home Next