BizzelTech.QuickBooks
1.0.0
See the version list below for details.
dotnet add package BizzelTech.QuickBooks --version 1.0.0
NuGet\Install-Package BizzelTech.QuickBooks -Version 1.0.0
<PackageReference Include="BizzelTech.QuickBooks" Version="1.0.0" />
<PackageVersion Include="BizzelTech.QuickBooks" Version="1.0.0" />
<PackageReference Include="BizzelTech.QuickBooks" />
paket add BizzelTech.QuickBooks --version 1.0.0
#r "nuget: BizzelTech.QuickBooks, 1.0.0"
#:package BizzelTech.QuickBooks@1.0.0
#addin nuget:?package=BizzelTech.QuickBooks&version=1.0.0
#tool nuget:?package=BizzelTech.QuickBooks&version=1.0.0
BizzelTools Excel Library
A powerful, customizable Excel library for .NET that provides a fluent API for creating and reading Excel documents. Built on top of the DocumentFormat.OpenXml library, BizzelTools.Excel offers an intuitive interface for Excel file manipulation while maintaining full control over the implementation.
๐ Features
- Fluent API: Easy-to-use, chainable methods for building Excel files
- Full Excel Support: Create, read, and modify Excel (.xlsx) files
- Rich Formatting: Support for fonts, colors, borders, alignment, and number formats
- Formula Support: Add Excel formulas to cells with automatic calculation
- Data Import: Easily import data from collections and arrays
- Worksheet Management: Create, rename, copy, and manage multiple worksheets
- Cell Ranges: Work with individual cells or ranges of cells
- Export Options: Export to Excel or CSV formats
- Type Safety: Strongly typed API with full IntelliSense support
- Comprehensive Testing: Well-tested with unit tests covering all major functionality
๐ฆ Installation
From NuGet Package
dotnet add package BizzelTools.Excel
Or via Package Manager Console in Visual Studio:
Install-Package BizzelTools.Excel
From Source
git clone https://github.com/yourusername/BizzelTools.git
cd BizzelTools
dotnet build
๐ Quick Start
Creating a Simple Excel File
using BizzelTools.Excel;
// Create a simple workbook
var workbook = Excel.Create()
.WithProperties(
title: "My Workbook",
author: "Your Name")
.ConfigureWorksheet("Data", ws => ws
.SetValue("A1", "Hello")
.SetValue("B1", "World")
.SetValue("A2", 42)
.SetValue("B2", DateTime.Now))
.SaveAs("example.xlsx");
Reading an Excel File
using BizzelTools.Excel;
// Open an existing Excel file
var workbook = Excel.Open("example.xlsx");
// Access worksheets and cells
var worksheet = workbook["Data"];
var cellValue = worksheet["A1"].Value;
Console.WriteLine($"Cell A1 contains: {cellValue}");
๐ Comprehensive Examples
1. Creating Styled Worksheets
var workbook = Excel.Create()
.ConfigureWorksheet("Sales Report", ws => ws
// Create headers
.SetValue("A1", "Product")
.SetValue("B1", "Price")
.SetValue("C1", "Quantity")
.SetValue("D1", "Total")
// Apply header styling
.ApplyStyle("A1:D1", style => style
.Font(bold: true, color: Color.White)
.BackgroundColor(Color.DarkBlue)
.CenterHorizontal()
.Borders(BorderStyle.Thin))
// Add data
.SetValue("A2", "Widget A")
.SetValue("B2", 10.50)
.SetValue("C2", 5)
.SetFormula("D2", "B2*C2")
// Format currency
.ApplyStyle("B2:B10", style => style.NumberFormat("$#,##0.00"))
.ApplyStyle("D2:D10", style => style.NumberFormat("$#,##0.00")))
.SaveAs("sales_report.xlsx");
2. Importing Data from Collections
var employees = new[]
{
new { Name = "John Doe", Department = "IT", Salary = 75000 },
new { Name = "Jane Smith", Department = "HR", Salary = 65000 },
new { Name = "Bob Johnson", Department = "Finance", Salary = 80000 }
};
var workbook = Excel.Create()
.ConfigureWorksheet("Employees", ws => ws
.InsertData(1, 1, employees, includeHeaders: true)
// Style the headers
.ApplyStyle("A1:C1", style => style
.Bold()
.BackgroundColor(Color.LightGray))
// Format salary column
.ApplyStyle("C2:C4", style => style.NumberFormat("$#,##0")))
.SaveAs("employees.xlsx");
3. Working with Formulas
var workbook = Excel.Create()
.ConfigureWorksheet("Calculations", ws => ws
// Basic arithmetic
.SetValue("A1", 10)
.SetValue("A2", 20)
.SetFormula("A3", "A1+A2")
// Excel functions
.SetValue("B1", 1)
.SetValue("B2", 2)
.SetValue("B3", 3)
.SetValue("B4", 4)
.SetValue("B5", 5)
.SetFormula("B6", "SUM(B1:B5)")
.SetFormula("B7", "AVERAGE(B1:B5)")
.SetFormula("B8", "MAX(B1:B5)"))
.SaveAs("calculations.xlsx");
4. Multiple Worksheets
var workbook = Excel.Create()
.AddWorksheet("Summary", ws => ws
.SetValue("A1", "Quarter 1 Summary")
.SetFormula("A2", "Q1!B10")) // Reference to Q1 worksheet
.AddWorksheet("Q1", ws => ws
.SetValue("A1", "Q1 Data")
.SetValue("B10", 50000))
.AddWorksheet("Q2", ws => ws
.SetValue("A1", "Q2 Data")
.SetValue("B10", 75000))
.SaveAs("quarterly_report.xlsx");
5. Advanced Styling
var workbook = Excel.Create()
.ConfigureWorksheet("Styled Report", ws => ws
.SetValue("A1", "Company Report")
.ApplyStyle("A1", style => style
.Font(name: "Arial", size: 18, bold: true, color: Color.DarkBlue)
.CenterHorizontal())
.SetValue("A3", "Important Note")
.ApplyStyle("A3", style => style
.Font(italic: true, underline: true)
.FontColor(Color.Red)
.BackgroundColor(Color.Yellow)
.Borders(BorderStyle.Double))
.SetValue("A5", "Wrapped Text Example\nThis text will wrap to multiple lines")
.ApplyStyle("A5", style => style.WrapText(true)))
.SaveAs("styled_report.xlsx");
๐๏ธ Architecture
The library is structured with the following main components:
Core Models
- ExcelWorkbook: Represents an Excel workbook containing multiple worksheets
- ExcelWorksheet: Represents a single worksheet with cells and data
- ExcelCell: Represents an individual cell with value, formula, and styling
- ExcelRange: Represents a range of cells for batch operations
- ExcelCellStyle: Defines formatting options for cells
I/O Operations
- ExcelReader: Handles reading Excel files and converting to library objects
- ExcelWriter: Handles writing library objects to Excel files and CSV export
Fluent API
- Excel: Main entry point with static methods
- ExcelWorkbookBuilder: Fluent builder for workbooks
- ExcelWorksheetBuilder: Fluent builder for worksheets
- ExcelStyleBuilder: Fluent builder for cell styles
๐งช Testing
The library includes comprehensive unit tests covering:
- Workbook and worksheet creation and management
- Cell value and formula operations
- Range operations and cell addressing
- Style application and inheritance
- File I/O operations
- Fluent API functionality
Run tests with:
dotnet test
๐ง Building from Source
- Clone the repository
- Restore dependencies:
dotnet restore
- Build the solution:
dotnet build
- Run tests:
dotnet test
- Create NuGet package:
dotnet pack --configuration Release
๐ Project Structure
BizzelTools/
โโโ src/
โ โโโ BizzelTools.Excel/ # Main library
โ โโโ Models/ # Core model classes
โ โโโ IO/ # File I/O operations
โ โโโ ExcelFluentAPI.cs # Fluent API implementation
โโโ tests/
โ โโโ BizzelTools.Excel.Tests/ # Unit tests
โโโ samples/
โ โโโ BizzelTools.Excel.Sample/ # Sample application
โโโ README.md # This file
๐ค Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests for new functionality
- Ensure all tests pass
- Submit a pull request
๐ Requirements
- .NET 8.0 or later
- DocumentFormat.OpenXml 3.0.2 or later
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Acknowledgments
- Built on top of the DocumentFormat.OpenXml library
- Inspired by popular Excel libraries like EPPlus and ClosedXML
- Designed for developers who need full control over their Excel generation logic
๐ Support
For questions, issues, or feature requests, please open an issue on GitHub or contact the maintainers.
BizzelTools.Excel - Making Excel manipulation simple, powerful, and customizable.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. 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 is compatible. 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. |
-
net10.0
- BizzelTech.Excel (>= 1.0.2)
- CsvHelper (>= 33.1.0)
- Microsoft.Extensions.Logging.Abstractions (>= 9.0.0)
-
net8.0
- BizzelTech.Excel (>= 1.0.2)
- CsvHelper (>= 33.1.0)
- Microsoft.Extensions.Logging.Abstractions (>= 9.0.0)
-
net9.0
- BizzelTech.Excel (>= 1.0.2)
- CsvHelper (>= 33.1.0)
- Microsoft.Extensions.Logging.Abstractions (>= 9.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.