SheetsSerializer 1.0.0

dotnet add package SheetsSerializer --version 1.0.0
                    
NuGet\Install-Package SheetsSerializer -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SheetsSerializer" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SheetsSerializer" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="SheetsSerializer" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add SheetsSerializer --version 1.0.0
                    
#r "nuget: SheetsSerializer, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package SheetsSerializer@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=SheetsSerializer&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=SheetsSerializer&version=1.0.0
                    
Install as a Cake Tool

SheetsSerializer

SheetsSerializer is a lightweight and extensible library to map Google Sheets data to C# objects using custom attributes. Ideal for those who need to consume spreadsheets as a source of structured data.

NuGet License


✨ Features

  • Direct mapping by spreadsheet header (with attribute support)
  • Automatic conversion of basic types (int, bool, DateTime, enum, etc.)
  • Extensible with custom converters (coming soon)
  • No external dependencies

πŸš€ Installation

Via NuGet:

dotnet add package SheetsSerializer

Or via Package Manager:

Install-Package SheetsSerializer

πŸ”§ How to Use

1. Define your target class

using SheetsSerializer.Annotations;

public class Student
{
    [SheetColumn("Nome completo")]
    public string Name { get; set; }

    [SheetColumn("Idade")]
    public int Age { get; set; }

    [SheetColumn("Data de inscriΓ§Γ£o")]
    public DateTime RegistrationDate { get; set; }
}

If you don't use [SheetColumn], the property name will be used as a fallback.


2. Use the serializer

using SheetsSerializer.Serialization;

// Assuming 'values' is IList<IList<object>> returned from Google Sheets
var serializer = new SheetsSerializer<Student>();
List<Student> students = serializer.Deserialize(values);

βœ… Supported Types

  • string
  • int, double, decimal, float
  • bool ("true", "1" or "false", "0")
  • DateTime
  • Enums

πŸ“Œ Roadmap

  • Serialization support (object β†’ Google Sheets)
  • Custom converter registration
  • Field-level validation feedback
  • Performance improvements (expression caching)
  • Integration with Google Sheets API (outside core scope)

πŸ“‚ Structure

SheetsSerializer/
β”œβ”€β”€ Annotations/
β”‚   └── SheetColumnAttribute.cs
β”œβ”€β”€ Serialization/
β”‚   └── SheetsSerializer.cs

πŸ§ͺ Testing

Coming soon: examples with xUnit/NUnit and mocked Google Sheets responses.


πŸ“„ License

MIT


πŸ™Œ Contributions

Contributions are welcome! Feel free to open issues or PRs.


πŸ“¬ Contact

Created by Lucas Silva.
Questions, suggestions, or bugs? Open an issue.

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net9.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 85 7/4/2025