private static void ApplyColumnFormat(
            this Range wholeColumnRange,
            Range dataCellsRange,
            Range lastHeaderCellToLastNonSummaryDataCellRange,
            ColumnFormat columnFormat)
        {
            if (columnFormat == null)
            {
                return;
            }

            var implementedProperties = new[]
            {
                nameof(ColumnFormat.CellsFormat),
                nameof(ColumnFormat.WidthInPixels),
                nameof(ColumnFormat.AutofitColumnWidth),
                nameof(ColumnFormat.Options),
            };

            columnFormat.ThrowOnNotImplementedProperty(implementedProperties);

            dataCellsRange.ApplyCellFormat(columnFormat.CellsFormat);

            wholeColumnRange.SetPerColumnWidthInPixels(columnFormat.WidthInPixels);

            // Apply options before auto-fitting, in case options change width of column (e.g. filtering)
            wholeColumnRange.ApplyColumnFormatOptions(lastHeaderCellToLastNonSummaryDataCellRange, columnFormat.Options);

            if (columnFormat.AutofitColumnWidth == true)
            {
                wholeColumnRange.Worksheet.AutoFitColumn(
                    lastHeaderCellToLastNonSummaryDataCellRange.FirstColumn,
                    lastHeaderCellToLastNonSummaryDataCellRange.FirstRow,
                    lastHeaderCellToLastNonSummaryDataCellRange.FirstRow + lastHeaderCellToLastNonSummaryDataCellRange.RowCount - 1);
            }
        }