Created
September 14, 2016 08:30
-
-
Save johnsonz/611139a7228b900cc72de84f2071738c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static void Main(string[] args) | |
{ | |
IWorkbook workbook = new XSSFWorkbook(); | |
ISheet sheet1 = workbook.CreateSheet("Sheet1"); | |
sheet1.CreateRow(0).CreateCell(0).SetCellValue("This is a Sample"); | |
int x = 1; | |
for (int i = 1; i <= 15; i++) | |
{ | |
IRow row = sheet1.CreateRow(i); | |
for (int j = 0; j < 15; j++) | |
{ | |
row.CreateCell(j).SetCellValue(x++); | |
} | |
} | |
FileStream sw = File.Create("test.xlsx"); | |
workbook.Write(sw); | |
sw.Close(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment