Пример #1
0
        public void ApplyFormat()
        {
            Workbook  workbook  = new Workbook();
            Worksheet worksheet = workbook.Worksheets.Add();

            CellSelection   cellSelectionA1  = worksheet.Cells[new CellIndex(0, 0)];
            CellValueFormat scientificFormat = new CellValueFormat("0.00E+00");

            cellSelectionA1.SetFormat(scientificFormat);

            CellSelection   cellSelectionA2B3 = worksheet.Cells[new CellRange(new CellIndex(1, 0), new CellIndex(2, 1))];
            CellValueFormat percentageFormat  = new CellValueFormat("0.00%");

            cellSelectionA2B3.SetFormat(percentageFormat);
        }