@@ -0,0 +1,1258 @@
+import jxl.Workbook;%0Aimport jxl.write.*;%0Aimport jxl.write.Number;%0Aimport jxl.write.biff.RowsExceededException;%0A%0Aimport java.io.File;%0Aimport java.io.IOException;%0Aimport java.util.Random;%0A%0A/**%0A * Created by training on 9/2/2014.%0A */%0Apublic class Write2Excel2 %7B%0A    public static void main(String%5B%5D args) %7B%0A%0A        try %7B%0A            Random rand = new Random();%0A            int randomNum;%0A            File exlFile = new File(%22WriteToExcel2.xls%22);%0A            WritableWorkbook writableWorkbook = Workbook.createWorkbook(exlFile);%0A%0A            WritableSheet writableSheet = writableWorkbook.createSheet(%22MySheet1%22, 0);%0A            for (int i = 0; i %3C 10; i++) %7B%0A                for(int j = 0; j %3C 10; j++) %7B%0A                    randomNum = rand.nextInt(100);%0A                    Number num = new Number(i, j, randomNum);%0A                    writableSheet.addCell(num);%0A                %7D%0A            %7D%0A%0A            writableWorkbook.write();%0A            writableWorkbook.close();%0A            System.out.println(%22File was created%22);%0A%0A        %7D catch (IOException e) %7B%0A            e.printStackTrace();%0A        %7D catch (RowsExceededException e) %7B%0A            e.printStackTrace();%0A        %7D catch (WriteException e) %7B%0A            e.printStackTrace();%0A        %7D%0A    %7D%0A%7D%0A

Create WriteToExcel.java