# Training coverage matrix

Track validated training states and calculate completion counts for each colleague and the team. Download the Excel workbook and C# source.

Excel · C# walkthrough

See who has completed the required modules and where follow-up is needed without maintaining a separate summary by hand.

[Build this report](#example-code)[Download XLSX](/downloads/showcase/workflows/excel-training-matrix/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**

People, required modules and completion states

**Generate**

XLSX

[!\[Generated Excel example: Training coverage matrix\](/downloads/showcase/workflows/excel-training-matrix/preview.webp)](/downloads/showcase/workflows/excel-training-matrix/preview.png)

Generated worksheet · Generated by the example below

## How it works

1. ### Build the matrix
  
  Place colleagues in rows and required modules in columns, with a dedicated calculated total.
2. ### Constrain the states
  
  Add a validation list with Not started, Scheduled and Complete so entries stay consistent.
3. ### Count completion
  
  Use COUNTIF for each person, SUM for the team total and a percentage cell for overall coverage.

## 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>Combines validated completion states with per-person and team training counts.</summary>
internal static class TrainingMatrix {
    internal static void Create(string folder) {
        using ExcelDocument document = ExcelDocument.Create(Path.Combine(folder, "example.xlsx"));
        var sheet = document.AddSheet("Training");
        sheet.SetColumnWidth(1, ExcelColumnWidth.Characters(26));
        for (int column = 2; column <= 5; column++) sheet.SetColumnWidth(column, ExcelColumnWidth.Characters(21));
        sheet.Range("A1:E1").Merge(); sheet.Cell(1, 1).SetValue("Team training coverage");
        sheet.Cell(1, 1).SetFontSize(global::OfficeIMO.OfficeLength.Points(20)); sheet.Cell(1, 1).SetBold(true); sheet.Cell(1, 1).SetColor(OfficeColor.Parse("17365D"));
        sheet.Range("A2:E2").Merge(); sheet.Cell(2, 1).SetValue("Three required modules / sample completion record");
        string[,] values = {
            { "Colleague", "Service basics", "Data handling", "Recovery", "Completed" },
            { "Maya Ellis", "Complete", "Complete", "Complete", "" },
            { "Leon Brooks", "Complete", "Scheduled", "Not started", "" },
            { "Sofia Chen", "Complete", "Complete", "Scheduled", "" },
            { "Amir Patel", "Scheduled", "Not started", "Not started", "" },
            { "Eva Morgan", "Complete", "Complete", "Complete", "" }
        };
        for (int row = 0; row < 6; row++) for (int column = 0; column < 5; column++) sheet.Cell(row + 4, column + 1).SetValue(values[row, column]);
        for (int row = 5; row <= 9; row++) sheet.Cell(row, 5).SetFormula($"COUNTIF(B{row}:D{row},\"Complete\")");
        sheet.AddTable("A4:E9", hasHeader: true, name: "Training", style: ExcelTableStyle.TableStyleMedium2);
        sheet.Range("B5:D9").Validation().List(new[] { "Not started", "Scheduled", "Complete" });
        sheet.Cell(11, 1).SetValue("Completed modules"); sheet.Cell(11, 5).SetFormula("SUM(E5:E9)");
        sheet.Cell(12, 1).SetValue("Required modules"); sheet.Cell(12, 5).SetValue(15);
        sheet.Cell(13, 1).SetValue("Completion rate"); sheet.Cell(13, 5).SetFormula("E11/E12"); sheet.Cell(13, 5).SetNumberFormat("0%");
        sheet.Cell(13, 5).SetFillColor(OfficeColor.Parse("E7F6ED")); sheet.Cell(13, 5).SetBold(true);
        document.Calculate();
        sheet.Range("A1:E15").ToImage(OfficeImageExportFormat.Png).Save(Path.Combine(folder, "preview.png"), OfficeImageExportFileConflictPolicy.Replace);
        document.Save();
    }
}
```

[Open the C# source file](/downloads/showcase/workflows/excel-training-matrix/TrainingMatrix.cs.txt)

## API used in this example

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

## Use this in your project

Replace the sample modules and people, and update the required-module total when the matrix changes. Track expiry dates separately if certification must be renewed.

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 example records completion states, not accredited certification. The preview does not exercise Excel's interactive validation dropdown.

[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/)
- [Word**Employee onboarding checklist**](/showcase/word-onboarding-checklist/)

<!-- PowerForge markdown artifact sha256:3B2602D5E555A00C8DEAD3062E40C60153922AE9525B5E8F2B6A3B6A2BA1E408 -->
