Skip to content

Instantly share code, notes, and snippets.

@taka2
Created April 13, 2010 07:40
Show Gist options
  • Select an option

  • Save taka2/364397 to your computer and use it in GitHub Desktop.

Select an option

Save taka2/364397 to your computer and use it in GitHub Desktop.
import java.io.*;
import org.apache.poi.hssf.usermodel.*;
public class test
{
public static void main(String[] args) throws Exception
{
System.out.println(new java.util.Date());
HSSFWorkbook wb = new HSSFWorkbook();
HSSFSheet sheet = wb.createSheet("sheet1");
for(int i=0; i<10000; i++)
{
HSSFRow row = sheet.createRow(i);
for(int j=0; j<100; j++)
{
HSSFCell cell = row.createCell(j);
cell.setCellValue(i*j);
}
}
FileOutputStream out = new FileOutputStream("filename.xls");
wb.write(out);
out.close();
System.out.println(new java.util.Date());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment