
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
CsvBuilder Utility Overview The CsvBuilder utility is a versatile .NET library developed by Samer Shahbaz, designed to simplify the process of creating CSV (Comma-Separated Values) files using DataTables. This utility streamlines CSV generation, allowing users to effortlessly transform tabular data into a widely compatible format.
Key Features DataSet Integration: Accepts a DataSet, facilitating the aggregation of multiple DataTables for CSV creation. Flexible Value Rendering: Supports a customizable event, ValueRenderEvent, enabling users to define custom parsers for values based on their data type (column or row). Multiple DataTable Support: Enables selective inclusion of columns from different DataTables by specifying the table index. Stream Handling: Efficiently manages memory streams to optimize CSV generation. Dispose Method: Implements the IDisposable interface for proper resource management. Usage
Constructor: Static Method for Creating CsvBuilder with Multiple DataTables:
Example #1 ICsvBuilder csvBuilder = CsvBuilder.Datasets(dataTable1, dataTable2, ...); Building CSV:
ICsvExtractor csvExtractor = csvBuilder.Build(tableIndex1, tableIndex2, ...);
Output Handling:
Obtain the CSV content as a Stream: MemoryStream csvStream = csvExtractor.GetStream(); Save the CSV content to a file: csvExtractor.SaveAsFile("filePath.csv");
Example #2:
// sample datasets var filters = dataSource.Tables[2]; var companyInformation = dataSource.Tables[1]; var actualDataSet = dataSource.Tables[0]; var details = dataSource.Tables[3];
// create an instance for builder and initialize var builder = CsvBuilder.Datasets(filters, companyInformation, actualDataSet);
//[optional] trigger evenet before value place in csv file builder.ValueRenderEvent += (value, e) => { return value; };
//generate a stream return builder.Build(2).GetStream();
Installation Install the CsvBuilder utility via NuGet Package Manager:
nuget install Samer.CsvBuilder License CsvBuilder is licensed under the MIT License.
FAQs
Unknown package
We found that samer-csv-builder demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.