@ -8,57 +8,78 @@ using Npoi.Core.OpenXmlFormats.Spreadsheet;
usingNpoi.Core.SS.UserModel;
usingNpoi.Core.XSSF.UserModel;
usingNpoi.Core.XWPF.UserModel;
usingNpoi.Core.SS.Util;
usingNpoi.Core.HSSF.Util;
namespaceNpoi.Samples.CreateNewSpreadsheet
{
publicclassProgram
{
publicstaticvoidMain(string[]args)
{
//var newFile = @"newbook.core.xlsx";
//using (var fs = new FileStream(newFile, FileMode.Create, FileAccess.Write))
//{
// IWorkbook wb = new XSSFWorkbook();
// ISheet sheet = wb.CreateSheet("Sheet1");
// //ICreationHelper cH = wb.GetCreationHelper();
// var rowIndex = 0;
// IRow row = sheet.CreateRow(rowIndex);
// var cell = row.CreateCell(0);
// var font = new XSSFFont();
// font.IsBold = true;
// cell.CellStyle.SetFont(font);
// cell.SetCellValue("A very long piece of text that I want to auto-fit innit, yeah. Although if it gets really, really long it'll probably start messing up more.");
cell.SetCellValue("你们什么时候A very long piece of text that I want to auto-fit innit, yeah. Although if it gets really, really long it'll probably start messing up more.");