示例#1
0
        private void AddRegions(IXLWorksheet worksheet, ExcelSheet sheet)
        {
            foreach (var dataRegion in sheet.Regions)
            {
                Throw <ArgumentNullException> .WhenObject.IsNull(() => dataRegion.Coordinates);

                _dataFormat = ExcelDataFormatFactory.GetDataFormat(dataRegion.ConfigurationDataFormat);
                _excelStyle = ExcelStyleFactory.GetStyle(dataRegion.ConfigurationExcelStyle);
                AddHeader(worksheet, dataRegion);
                AddRows(worksheet, dataRegion);
                SetStyles(worksheet, dataRegion);
                dataRegion.Coordinates.HeaderRowInitial++;
            }
        }