Bat.Tools
7.0.0
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Bat.Tools --version 7.0.0
NuGet\Install-Package Bat.Tools -Version 7.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="Bat.Tools" Version="7.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Bat.Tools --version 7.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Bat.Tools, 7.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.
// Install Bat.Tools as a Cake Addin #addin nuget:?package=Bat.Tools&version=7.0.0 // Install Bat.Tools as a Cake Tool #tool nuget:?package=Bat.Tools&version=7.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
For use Bat.Tools just do it :
1- Install Bat.Tools on your project
2- Use it in bussiness logic for example :
public class BaseService : IBaseService
{
public void UseBatToolsSample()
{
//Excel extention methods
var userList = await _appUow.UserRepo
.Include(x => x.Families)
.Select(x => new { x.UserId, x.Name })
.ToListAsync();
var excelByteArray = userList.ToExcel(sheetName: "UserReport");
using var package = new ExcelPackage("files/UserReport.xlsx")
var data = package.Workbook.Worksheets["UserReport"]
.Extract<RowDataWithColumnBeingRow>()
.WithProperty(p => p.UserId, "B")
.WithProperty(p => p.Name, "C")
// Here, the collection property is defined using the "WithCollectionProperty" method.
// The following parameter is the expression indicating the property of "ColumnData"
// that will be used to receive the header data followed by an integer indicating the row
// that contains the header.
// The last expression indicates the other "ColumnData" property, this one will receive
// the row data. The two last strings are the start and end column from where
// this data will be extracted.
.WithCollectionProperty(p => p.Families,
item => item.FirstName, 1,
item => item.LastName, "E", "S")
.GetData(2, 10)
.ToList();
//some useful extension methods
var x1 = 9301919109.IsMobileNumber();
var x2 = "9301919109".ToStandardMobileNumber();
var x3 = 1258963.ToNumeric(); //1,258,963
var x4 = 1258963.ToCurrency(); //1,258,963ریال
var x5 = 1100000.ToText(); //یک میلیون و صد هزار تومان
var base64ImageString = "569821".GetCaptchaImage();
}
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. 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 was computed. 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net7.0
- Bat.Core (>= 7.0.0)
- EPPlus (>= 6.1.1)
- EPPlus.DataExtractor (>= 2.2.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
- Add new Excel extension methods for read and write to excel files
- Add new enum extension methods for get description attribute