NPOI.XSSF.UserModel.XSSFWorkbook.GetCellStyleAt C# (CSharp) Метод

GetCellStyleAt() публичный Метод

public GetCellStyleAt ( short idx ) : ICellStyle
idx short
Результат ICellStyle
        public ICellStyle GetCellStyleAt(short idx)
        {
            return GetCellStyleAt(idx & 0xffff);
        }
        /**

Same methods

XSSFWorkbook::GetCellStyleAt ( int idx ) : NPOI.XSSF.UserModel.XSSFCellStyle

Usage Example

Пример #1
0
        public void GetCellStyleAt()
        {
            XSSFWorkbook workbook = new XSSFWorkbook();

            try
            {
                short i = 0;
                //get default style
                ICellStyle cellStyleAt = workbook.GetCellStyleAt(i);
                Assert.IsNotNull(cellStyleAt);

                //get custom style
                StylesTable   styleSource = workbook.GetStylesSource();
                XSSFCellStyle customStyle = new XSSFCellStyle(styleSource);
                XSSFFont      font        = new XSSFFont();
                font.FontName = ("Verdana");
                customStyle.SetFont(font);
                int x = styleSource.PutStyle(customStyle);
                cellStyleAt = workbook.GetCellStyleAt((short)x);
                Assert.IsNotNull(cellStyleAt);
            }
            finally
            {
            }
        }
All Usage Examples Of NPOI.XSSF.UserModel.XSSFWorkbook::GetCellStyleAt