Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

simple-csv-viewer

A small, native Windows CSV table viewer built with C++20 and raw Win32 API.

It is designed as a fast, read-only utility for opening CSV-like files in a virtual table, without .NET, Electron, Qt, or other heavy UI stacks.

Screenshot

simple-csv-viewer main window

Features

  • Native Win32 app (WC_LISTVIEW in report + owner-data mode).
  • Memory-mapped file loading for efficient handling of large files.
  • Lazy row/cell parsing for virtualized display performance.
  • Open files from:
  • command-line argument (csvviewer.exe <path-to-file>)
  • File -> Open...
  • drag and drop onto the app window
  • Header row support:
  • first CSV row is used as column headers
  • header columns are created dynamically
  • Delimiter detection:
  • semicolon (;), comma (,), tab (\t)
  • consistency-based heuristic with semicolon priority on ties
  • Encoding detection:
  • UTF-8 with BOM
  • UTF-8 (valid UTF-8 byte sequences)
  • ANSI/code-page fallback
  • Read-only table behavior:
  • vertical and horizontal scrolling
  • full-row selection
  • Ctrl+C / Edit -> Copy copies selected rows as tab-separated text
  • Usability:
  • status bar with row/column count, delimiter, and encoding
  • search/filter box (case-insensitive row filtering)
  • column sorting by clicking headers (toggle ascending/descending)
  • auto-fit columns command
  • zoom in/out and preset font sizes
  • double-click cell for detail popup
  • recent files menu persisted in settings.ini

Current Scope

  • Read-only viewer only (no cell editing or save-back).
  • Pragmatic CSV parser with quoted field support and escaped quotes ("").
  • Embedded newlines inside quoted fields are not a primary v1 target.

Build

Requirements

  • Windows 10/11
  • Visual Studio 2022 Build Tools (C++ workload)
  • CMake 3.15+
  • PowerShell 7+ (recommended)

Build Commands

Release build:

.\build.ps1 -Configuration Release

Debug build:

.\build.ps1 -Configuration Debug

Use Ninja generator (if ninja is available on PATH):

.\build.ps1 -UseNinja -Configuration Release

Clean build directory before configure/build:

.\build.ps1 -Clean -Configuration Release

Optional smoke test (launches and closes the GUI executable):

.\build.ps1 -Configuration Release -RunSmokeTest

Output

  • Visual Studio generator: build\Release\csvviewer.exe (or build\Debug\csvviewer.exe)
  • Ninja generator: build\csvviewer.exe

Usage

  • Launch without arguments, then open via File -> Open...
  • Or launch directly with a file path:
.\build\Release\csvviewer.exe .\sample.csv

Repository

GitHub: git@github.com:Danmoreng/simple-csv-viewer.git

License

This project is licensed under the MIT License. See LICENSE.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages