# Six-week workload trend

Generate an editable Excel line chart from received and resolved request counts, with weekly net-change formulas. Includes the XLSX and source.

Excel · C# walkthrough

Read the source figures and their trend together. A chart helps show direction while the adjacent values keep the calculation inspectable.

[Build this report](#example-code)[Download XLSX](/downloads/showcase/workflows/excel-operational-trends/example.xlsx) [Try this file in your browser](/browser/excel-to-pdf/)

Opens the generated download in a local browser tool. The C# example below creates the document.

**Start with**

Six weekly received and resolved counts

**Generate**

XLSX

[!\[Generated Excel example: Six-week workload trend\](/downloads/showcase/workflows/excel-operational-trends/preview.webp)](/downloads/showcase/workflows/excel-operational-trends/preview.png)

Generated worksheet · Generated by the example below

## How it works

1. ### Write the weekly values
  
  Create a table with week labels, received counts, resolved counts and a formula for net change.
2. ### Link the chart to the range
  
  Call AddChartFromRange with the labels and both series, choose a line chart and position it below the data.
3. ### Render a useful review range
  
  Calculate formulas and export a range that includes both the table and chart.

## The C# source

The example below shows the document API and layout used for this report. Follow the Excel guide for package setup in your own project.

```csharp
using OfficeIMO.Drawing;
using OfficeIMO.Excel;

namespace OfficeIMO.Examples.Showcase.Workflows;

/// <summary>Builds a six-week workload chart from editable worksheet values.</summary>
internal static class OperationalTrends {
    internal static void Create(string folder) {
        using ExcelDocument document = ExcelDocument.Create(Path.Combine(folder, "example.xlsx"));
        var sheet = document.AddSheet("Weekly trend");
        sheet.SetColumnWidth(1, ExcelColumnWidth.Characters(26)); sheet.SetColumnWidth(2, ExcelColumnWidth.Characters(24)); sheet.SetColumnWidth(3, ExcelColumnWidth.Characters(24)); sheet.SetColumnWidth(4, ExcelColumnWidth.Characters(22));
        sheet.Range("A1:D1").Merge(); sheet.Cell(1, 1).SetValue("Support workload over six weeks");
        sheet.Cell(1, 1).SetFontSize(global::OfficeIMO.OfficeLength.Points(20)); sheet.Cell(1, 1).SetBold(true); sheet.Cell(1, 1).SetColor(OfficeColor.Parse("17365D"));
        string[] headers = { "Week", "Received", "Resolved", "Net change" };
        for (int column = 1; column <= 4; column++) sheet.Cell(4, column).SetValue(headers[column - 1]);
        int[] received = { 82, 95, 88, 105, 97, 91 }, resolved = { 79, 90, 94, 98, 104, 100 };
        for (int index = 0; index < received.Length; index++) {
            int row = index + 5;
            sheet.Cell(row, 1).SetValue("Week " + (index + 1)); sheet.Cell(row, 2).SetValue(received[index]); sheet.Cell(row, 3).SetValue(resolved[index]);
            sheet.Cell(row, 4).SetFormula($"B{row}-C{row}");
        }
        sheet.AddTable("A4:D10", hasHeader: true, name: "WeeklyWorkload", style: ExcelTableStyle.TableStyleMedium2);
        sheet.AddChart(OfficeChartType.Line, "A4:C10", new OfficeIMO.Excel.ExcelChartOptions { Row = 13, Column = 1, Width = OfficeLength.Pixels(620), Height = OfficeLength.Pixels(300), Title = "Received and resolved requests" });
        document.Calculate();
        sheet.Range("A1:D30").ToImage(OfficeImageExportFormat.Png).Save(Path.Combine(folder, "preview.png"), OfficeImageExportFileConflictPolicy.Replace);
        document.Save();
    }
}
```

[Open the C# source file](/downloads/showcase/workflows/excel-operational-trends/OperationalTrends.cs.txt)

## API used in this example

- [`ExcelColumnWidth`](/api/excel/officeimo-excel-excelcolumnwidth/)
- [`OfficeLength`](/api/core/officeimo-officelength/)
- [`ExcelDocument`](/api/excel/officeimo-excel-exceldocument/)
- [`ExcelChartOptions`](/api/excel/officeimo-excel-excelchartoptions/)
- [`ExcelTableStyle`](/api/excel/officeimo-excel-exceltablestyle/)
- [`OfficeChartType`](/api/core/officeimo-officecharttype/)
- [`OfficeColor`](/api/core/officeimo-officecolor/)
- [`OfficeImageExportFileConflictPolicy`](/api/core/officeimo-drawing-officeimageexportfileconflictpolicy/)
- [`OfficeImageExportFormat`](/api/core/officeimo-drawing-officeimageexportformat/)

## Use this in your project

Use equal time windows and consistent definitions when replacing the sample data. Net change describes flow; include starting backlog if you need a backlog total.

The [Excel guide](/docs/excel/) explains package setup and related document APIs.

## Documents and scope

### What the preview shows

The linked C# example generates this file. The runner reopens and validates the XLSX and checks supported formulas, cached results and dependencies. The PNG is a native worksheet-range export.

### What to keep in mind

The values are synthetic. The image is OfficeIMO's native worksheet rendering; desktop Excel chart appearance can differ.

[Excel API reference](/api/excel/) · [Artifact hashes and provenance](/downloads/showcase/manifest.json)

## Continue with another example

- [Excel**A project workbook with a summary**](/showcase/excel-project-workbook/)
- [PowerPoint**Results briefing with an editable chart**](/showcase/powerpoint-results-briefing/)

<!-- PowerForge markdown artifact sha256:1AF4C049D40BF11A84B3B0DBB6DC5A0AE9A9F9B0C5EA34C624CB706AD56C3FE4 -->
