# duyhuynhsc/excelsupport architecture

> Architecture diagram of the GitHub repository duyhuynhsc/excelsupport, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-24). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/duyhuynhsc/excelsupport
- Repository: https://github.com/duyhuynhsc/excelsupport

## Overview

ExcelSupport is an Excel add-in for navigating workbooks and performing spreadsheet, Japanese-language, AI, and Oracle tasks. Users enter through Excel’s ribbon or task pane, choose a tool, work with a WPF dialog, and apply or inspect results in Excel; the README also documents preview-before-insertion for Oracle queries and evidence/report output for page counting. The graph preserves these major capabilities and a service layer. Some feature wiring is documented rather than visible in the sampled excerpts, so uncertain call relationships are omitted.

Main entry points: [`Views/Data`](https://github.com/duyhuynhsc/excelsupport/tree/main/Views/Data) (Data tool dialogs), [`Views/Japanese`](https://github.com/duyhuynhsc/excelsupport/tree/main/Views/Japanese) (Japanese tool dialogs), [`Services/Workbook/DesignPageCounterService.cs`](https://github.com/duyhuynhsc/excelsupport/blob/main/Services/Workbook/DesignPageCounterService.cs) (Design page counter), [`Services/Oracle/OracleQuickQueryService.cs`](https://github.com/duyhuynhsc/excelsupport/blob/main/Services/Oracle/OracleQuickQueryService.cs) (Oracle query service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Excel Add-in"]
  node_ribbon["Ribbon commands"]
  node_host["Add-in events<br/>[AddInEvents.cs]"]
  node_taskpane["Navigation pane"]
  node_workbook_tree["Workbook tree UI"]
end

subgraph group_workbook["Workbook Tools"]
  node_page_counter["Design page counter"]
  node_page_dialog["Page counter UI"]
  node_snapshots["Sheet snapshots"]
  node_compare["Workbook comparison"]
end

subgraph group_data["Data Tools"]
  node_data_dialogs["Data tool dialogs"]
  node_batch_files["Batch file conversion"]
  node_filter["Advanced filtering"]
  node_table_merge["Table merge"]
end

subgraph group_japanese["Japanese Tools"]
  node_japanese_ui["Japanese tool dialogs"]
  node_text_converter["Text conversion"]
  node_katakana["Katakana validation"]
  node_presets["Format presets"]
end

subgraph group_integrations["AI and Oracle"]
  node_ai_ui["AI assistant UI"]
  node_formula_doctor["Formula diagnosis"]
  node_translation["AI translation"]
  node_openai_client["AI client"]
  node_oracle_ui["Oracle query UI"]
  node_oracle_query["Oracle query service"]
  node_oracle_profiles["Oracle profiles"]
end

node_excel_user(("Excel user"))
node_excel["Microsoft Excel"]
node_ai_provider{{"AI provider"}}
node_oracle_db[("Oracle database")]

node_excel_user -->|"chooses tools"| node_ribbon
node_excel_user -->|"navigates sheets"| node_taskpane
node_ribbon -->|"dispatches commands"| node_host
node_taskpane -->|"shows navigation"| node_workbook_tree
node_workbook_tree -->|"navigates workbooks"| node_excel
node_page_dialog -->|"starts analysis"| node_page_counter
node_page_counter -->|"reads and updates"| node_excel
node_page_counter -->|"produces report"| node_excel_user
node_snapshots -->|"captures and restores"| node_excel
node_compare -->|"compares sheets"| node_excel
node_data_dialogs -->|"converts files"| node_batch_files
node_batch_files -->|"saves workbooks"| node_excel
node_data_dialogs -->|"filters data"| node_filter
node_data_dialogs -->|"merges tables"| node_table_merge
node_table_merge -->|"writes results"| node_excel
node_japanese_ui -->|"converts text"| node_text_converter
node_text_converter -->|"updates cells"| node_excel
node_japanese_ui -->|"validates text"| node_katakana
node_japanese_ui -->|"applies formatting"| node_presets
node_presets -->|"formats cells"| node_excel
node_ai_ui -->|"diagnoses formulas"| node_formula_doctor
node_ai_ui -->|"translates text"| node_translation
node_formula_doctor -->|"requests diagnosis"| node_openai_client
node_translation -->|"requests translation"| node_openai_client
node_openai_client -.->|"sends prompts"| node_ai_provider
node_oracle_ui -->|"runs query"| node_oracle_query
node_oracle_ui -->|"loads profiles"| node_oracle_profiles
node_oracle_query -->|"queries database"| node_oracle_db
node_oracle_query -->|"inserts results"| node_excel

click node_ribbon "https://github.com/duyhuynhsc/excelsupport/blob/main/Ribbon/RibbonController.cs"
click node_host "https://github.com/duyhuynhsc/excelsupport/blob/main/AddInEvents.cs"
click node_taskpane "https://github.com/duyhuynhsc/excelsupport/blob/main/ViewModels/TaskPaneViewModel.cs"
click node_workbook_tree "https://github.com/duyhuynhsc/excelsupport/blob/main/Views/Workbook/WorkbookTreeViewControl.xaml.cs"
click node_page_counter "https://github.com/duyhuynhsc/excelsupport/blob/main/Services/Workbook/DesignPageCounterService.cs"
click node_page_dialog "https://github.com/duyhuynhsc/excelsupport/blob/main/Views/Workbook/DesignPageCounterDialog.xaml.cs"
click node_snapshots "https://github.com/duyhuynhsc/excelsupport/blob/main/Services/Workbook/SheetSnapshotService.cs"
click node_compare "https://github.com/duyhuynhsc/excelsupport/blob/main/Views/Workbook/WorkbookCompareDialog.xaml.cs"
click node_data_dialogs "https://github.com/duyhuynhsc/excelsupport/tree/main/Views/Data"
click node_batch_files "https://github.com/duyhuynhsc/excelsupport/blob/main/Services/Data/BatchFileConverterService.cs"
click node_filter "https://github.com/duyhuynhsc/excelsupport/blob/main/Services/Data/AdvancedFilterService.cs"
click node_table_merge "https://github.com/duyhuynhsc/excelsupport/blob/main/Services/Data/TableMergeService.cs"
click node_japanese_ui "https://github.com/duyhuynhsc/excelsupport/tree/main/Views/Japanese"
click node_text_converter "https://github.com/duyhuynhsc/excelsupport/blob/main/Services/Japanese/JapaneseTextConverterService.cs"
click node_katakana "https://github.com/duyhuynhsc/excelsupport/blob/main/Services/Japanese/KatakanaValidatorService.cs"
click node_presets "https://github.com/duyhuynhsc/excelsupport/blob/main/Services/Japanese/JapanesePresetFormatService.cs"
click node_ai_ui "https://github.com/duyhuynhsc/excelsupport/blob/main/Views/Ai/AiAssistantControl.xaml.cs"
click node_formula_doctor "https://github.com/duyhuynhsc/excelsupport/blob/main/Services/Ai/AiFormulaDoctorService.cs"
click node_translation "https://github.com/duyhuynhsc/excelsupport/blob/main/Services/Ai/AiTranslationService.cs"
click node_openai_client "https://github.com/duyhuynhsc/excelsupport/blob/main/Services/Ai/OpenAiClientService.cs"
click node_oracle_ui "https://github.com/duyhuynhsc/excelsupport/blob/main/Views/Oracle/OracleQuickQueryDialog.xaml.cs"
click node_oracle_query "https://github.com/duyhuynhsc/excelsupport/blob/main/Services/Oracle/OracleQuickQueryService.cs"
click node_oracle_profiles "https://github.com/duyhuynhsc/excelsupport/blob/main/Services/Oracle/OracleConnectionManager.cs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_ribbon,node_host,node_taskpane,node_workbook_tree,node_excel_user toneBlue
class node_page_counter,node_page_dialog,node_snapshots,node_compare,node_oracle_db toneAmber
class node_data_dialogs,node_batch_files,node_filter,node_table_merge toneMint
class node_japanese_ui,node_text_converter,node_katakana,node_presets toneRose
class node_ai_ui,node_formula_doctor,node_translation,node_openai_client,node_oracle_ui,node_oracle_query,node_oracle_profiles,node_excel,node_ai_provider toneIndigo
```

## Components

### Excel Add-in

- [Ribbon commands](https://github.com/duyhuynhsc/excelsupport/blob/main/Ribbon/RibbonController.cs): `Ribbon/RibbonController.cs`
- [Add-in events](https://github.com/duyhuynhsc/excelsupport/blob/main/AddInEvents.cs): `AddInEvents.cs`
- [Navigation pane](https://github.com/duyhuynhsc/excelsupport/blob/main/ViewModels/TaskPaneViewModel.cs): `ViewModels/TaskPaneViewModel.cs`
- [Workbook tree UI](https://github.com/duyhuynhsc/excelsupport/blob/main/Views/Workbook/WorkbookTreeViewControl.xaml.cs): `Views/Workbook/WorkbookTreeViewControl.xaml.cs`

### Workbook Tools

- [Design page counter](https://github.com/duyhuynhsc/excelsupport/blob/main/Services/Workbook/DesignPageCounterService.cs): `Services/Workbook/DesignPageCounterService.cs`
- [Page counter UI](https://github.com/duyhuynhsc/excelsupport/blob/main/Views/Workbook/DesignPageCounterDialog.xaml.cs): `Views/Workbook/DesignPageCounterDialog.xaml.cs`
- [Sheet snapshots](https://github.com/duyhuynhsc/excelsupport/blob/main/Services/Workbook/SheetSnapshotService.cs): `Services/Workbook/SheetSnapshotService.cs`
- [Workbook comparison](https://github.com/duyhuynhsc/excelsupport/blob/main/Views/Workbook/WorkbookCompareDialog.xaml.cs): `Views/Workbook/WorkbookCompareDialog.xaml.cs`

### Data Tools

- [Data tool dialogs](https://github.com/duyhuynhsc/excelsupport/tree/main/Views/Data): `Views/Data`
- [Batch file conversion](https://github.com/duyhuynhsc/excelsupport/blob/main/Services/Data/BatchFileConverterService.cs): `Services/Data/BatchFileConverterService.cs`
- [Advanced filtering](https://github.com/duyhuynhsc/excelsupport/blob/main/Services/Data/AdvancedFilterService.cs): `Services/Data/AdvancedFilterService.cs`
- [Table merge](https://github.com/duyhuynhsc/excelsupport/blob/main/Services/Data/TableMergeService.cs): `Services/Data/TableMergeService.cs`

### Japanese Tools

- [Japanese tool dialogs](https://github.com/duyhuynhsc/excelsupport/tree/main/Views/Japanese): `Views/Japanese`
- [Text conversion](https://github.com/duyhuynhsc/excelsupport/blob/main/Services/Japanese/JapaneseTextConverterService.cs): `Services/Japanese/JapaneseTextConverterService.cs`
- [Katakana validation](https://github.com/duyhuynhsc/excelsupport/blob/main/Services/Japanese/KatakanaValidatorService.cs): `Services/Japanese/KatakanaValidatorService.cs`
- [Format presets](https://github.com/duyhuynhsc/excelsupport/blob/main/Services/Japanese/JapanesePresetFormatService.cs): `Services/Japanese/JapanesePresetFormatService.cs`

### AI and Oracle

- [AI assistant UI](https://github.com/duyhuynhsc/excelsupport/blob/main/Views/Ai/AiAssistantControl.xaml.cs): `Views/Ai/AiAssistantControl.xaml.cs`
- [Formula diagnosis](https://github.com/duyhuynhsc/excelsupport/blob/main/Services/Ai/AiFormulaDoctorService.cs): `Services/Ai/AiFormulaDoctorService.cs`
- [AI translation](https://github.com/duyhuynhsc/excelsupport/blob/main/Services/Ai/AiTranslationService.cs): `Services/Ai/AiTranslationService.cs`
- [AI client](https://github.com/duyhuynhsc/excelsupport/blob/main/Services/Ai/OpenAiClientService.cs): `Services/Ai/OpenAiClientService.cs`
- [Oracle query UI](https://github.com/duyhuynhsc/excelsupport/blob/main/Views/Oracle/OracleQuickQueryDialog.xaml.cs): `Views/Oracle/OracleQuickQueryDialog.xaml.cs`
- [Oracle query service](https://github.com/duyhuynhsc/excelsupport/blob/main/Services/Oracle/OracleQuickQueryService.cs): `Services/Oracle/OracleQuickQueryService.cs`
- [Oracle profiles](https://github.com/duyhuynhsc/excelsupport/blob/main/Services/Oracle/OracleConnectionManager.cs): `Services/Oracle/OracleConnectionManager.cs`

### Other components

- **Excel user**
- **Microsoft Excel**
- **AI provider**
- **Oracle database**

## Connections

- Excel user → Ribbon commands: chooses tools
- Excel user → Navigation pane: navigates sheets
- Ribbon commands → Add-in events: dispatches commands
- Navigation pane → Workbook tree UI: shows navigation
- Workbook tree UI → Microsoft Excel: navigates workbooks
- Page counter UI → Design page counter: starts analysis
- Design page counter → Microsoft Excel: reads and updates
- Design page counter → Excel user: produces report
- Sheet snapshots → Microsoft Excel: captures and restores
- Workbook comparison → Microsoft Excel: compares sheets
- Data tool dialogs → Batch file conversion: converts files
- Batch file conversion → Microsoft Excel: saves workbooks
- Data tool dialogs → Advanced filtering: filters data
- Data tool dialogs → Table merge: merges tables
- Table merge → Microsoft Excel: writes results
- Japanese tool dialogs → Text conversion: converts text
- Text conversion → Microsoft Excel: updates cells
- Japanese tool dialogs → Katakana validation: validates text
- Japanese tool dialogs → Format presets: applies formatting
- Format presets → Microsoft Excel: formats cells
- AI assistant UI → Formula diagnosis: diagnoses formulas
- AI assistant UI → AI translation: translates text
- Formula diagnosis → AI client: requests diagnosis
- AI translation → AI client: requests translation
- AI client → AI provider: sends prompts
- Oracle query UI → Oracle query service: runs query
- Oracle query UI → Oracle profiles: loads profiles
- Oracle query service → Oracle database: queries database
- Oracle query service → Microsoft Excel: inserts results
