Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

ExcelReportExtensions

OfficeIMO.Excel.Reports

Namespace
OfficeIMO.Excel.Reports
Assembly
OfficeIMO.Excel
Source revision
e163ccb36643 with working tree changes
Modifiers
static

Business report presets for worksheets: KPI, trend, variance and contribution charts, dashboards and subtotal summaries. Each preset is built on the general chart, table and outline APIs of ExcelSheet.

Inheritance

  • object
  • ExcelReportExtensions

Methods

public static ExcelChart AddContributionChart(ExcelSheet sheet, string dataRangeA1, int row, int column, string title = "Contribution", OfficeLength? width = null, OfficeLength? height = null, bool hasHeaders = true, bool includeCachedData = true) #

Adds a doughnut chart with category/percent labels for contribution and mix analysis.

Parameters

sheet OfficeIMO.Excel.ExcelSheet required
dataRangeA1 string required
row int required
column int required
title string = "Contribution" optional
width OfficeIMO.OfficeLength? = null optional
height OfficeIMO.OfficeLength? = null optional
hasHeaders bool = true optional
includeCachedData bool = true optional

Returns

ExcelChart
public static ExcelDashboardResult AddDashboard(ExcelSheet sheet, DataTable data, ExcelDashboardOptions? options = null) #

Builds a dashboard table and optional chart from a data table.

Parameters

sheet OfficeIMO.Excel.ExcelSheet required
Worksheet that receives the dashboard.
data System.Data.DataTable required
Tabular data to write.
options OfficeIMO.Excel.Reports.ExcelDashboardOptions? = null optional
Dashboard layout and styling options.

Returns

ExcelDashboardResult Dashboard table range and generated chart metadata.
public static ExcelChart AddDashboardChart(ExcelSheet sheet, ExcelDashboardChartOptions options) #

Adds a dashboard-ready chart from a range or table and applies preset styling.

Parameters

sheet OfficeIMO.Excel.ExcelSheet required
Worksheet that receives the chart.
options OfficeIMO.Excel.Reports.ExcelDashboardChartOptions required
Dashboard chart options.

Returns

ExcelChart The created chart.
public static ExcelChart AddKpiScorecardChart(ExcelSheet sheet, string dataRangeA1, int row, int column, string title = "KPI Scorecard", OfficeLength? width = null, OfficeLength? height = null, bool hasHeaders = true, bool includeCachedData = true) #

Adds a compact column chart with value callouts and dashboard-friendly defaults for KPI scorecards.

Parameters

sheet OfficeIMO.Excel.ExcelSheet required
dataRangeA1 string required
row int required
column int required
title string = "KPI Scorecard" optional
width OfficeIMO.OfficeLength? = null optional
height OfficeIMO.OfficeLength? = null optional
hasHeaders bool = true optional
includeCachedData bool = true optional

Returns

ExcelChart
public static ExcelChart AddRevenueTrendChart(ExcelSheet sheet, string dataRangeA1, int row, int column, string title = "Revenue Trend", OfficeLength? width = null, OfficeLength? height = null, bool hasHeaders = true, bool includeCachedData = true) #

Adds a line chart with dashboard-friendly defaults for time-series revenue or volume trends.

Parameters

sheet OfficeIMO.Excel.ExcelSheet required
dataRangeA1 string required
row int required
column int required
title string = "Revenue Trend" optional
width OfficeIMO.OfficeLength? = null optional
height OfficeIMO.OfficeLength? = null optional
hasHeaders bool = true optional
includeCachedData bool = true optional

Returns

ExcelChart
public static ExcelChart AddStatusBreakdownChart(ExcelSheet sheet, string dataRangeA1, int row, int column, string title = "Status Breakdown", OfficeLength? width = null, OfficeLength? height = null, bool hasHeaders = true, bool includeCachedData = true) #

Adds a doughnut chart with dashboard-friendly defaults for status, category, or allocation breakdowns.

Parameters

sheet OfficeIMO.Excel.ExcelSheet required
dataRangeA1 string required
row int required
column int required
title string = "Status Breakdown" optional
width OfficeIMO.OfficeLength? = null optional
height OfficeIMO.OfficeLength? = null optional
hasHeaders bool = true optional
includeCachedData bool = true optional

Returns

ExcelChart
public static ExcelSubtotalResult AddSubtotalSummary(ExcelSheet sheet, ExcelSubtotalOptions options) #

Creates a grouped subtotal summary block from a contiguous worksheet data range.

Parameters

sheet OfficeIMO.Excel.ExcelSheet required
Worksheet that holds the data.
options OfficeIMO.Excel.Reports.ExcelSubtotalOptions required
Subtotal generation options.

Returns

ExcelSubtotalResult Information about the generated summary block.
public static ExcelChart AddTopNBarChart(ExcelSheet sheet, string dataRangeA1, int row, int column, string title = "Top Items", OfficeLength? width = null, OfficeLength? height = null, bool hasHeaders = true, bool includeCachedData = true) #

Adds a horizontal bar chart with dashboard-friendly defaults for top-N rankings.

Parameters

sheet OfficeIMO.Excel.ExcelSheet required
dataRangeA1 string required
row int required
column int required
title string = "Top Items" optional
width OfficeIMO.OfficeLength? = null optional
height OfficeIMO.OfficeLength? = null optional
hasHeaders bool = true optional
includeCachedData bool = true optional

Returns

ExcelChart
public static ExcelChart AddVarianceColumnChart(ExcelSheet sheet, string dataRangeA1, int row, int column, string title = "Variance", OfficeLength? width = null, OfficeLength? height = null, bool hasHeaders = true, bool includeCachedData = true) #

Adds a clustered column chart with dashboard-friendly defaults for variance comparisons.

Parameters

sheet OfficeIMO.Excel.ExcelSheet required
dataRangeA1 string required
row int required
column int required
title string = "Variance" optional
width OfficeIMO.OfficeLength? = null optional
height OfficeIMO.OfficeLength? = null optional
hasHeaders bool = true optional
includeCachedData bool = true optional

Returns

ExcelChart
public static ExcelChart AddVarianceWaterfallChart(ExcelSheet sheet, string dataRangeA1, int row, int column, string title = "Variance Bridge", OfficeLength? width = null, OfficeLength? height = null, bool hasHeaders = true, bool includeCachedData = true) #

Adds a waterfall-style stacked column chart for variance bridges prepared with helper series.

Parameters

sheet OfficeIMO.Excel.ExcelSheet required
dataRangeA1 string required
row int required
column int required
title string = "Variance Bridge" optional
width OfficeIMO.OfficeLength? = null optional
height OfficeIMO.OfficeLength? = null optional
hasHeaders bool = true optional
includeCachedData bool = true optional

Returns

ExcelChart
public static ExcelChart ApplyDashboardPreset(ExcelChart chart, ExcelDashboardChartPreset preset = Comparison, int? styleId = null, int? colorStyleId = null) #

Applies a dashboard preset's style, legend and data labels to an existing chart.

Parameters

chart OfficeIMO.Excel.ExcelChart required
Chart to restyle.
preset OfficeIMO.Excel.Reports.ExcelDashboardChartPreset = Comparison optional
The dashboard appearance preset.
styleId int? = null optional
Optional chart style override.
colorStyleId int? = null optional
Optional chart color-style override.

Returns

ExcelChart The same chart for further editing.