MySheet 1.0.5
dotnet add package MySheet --version 1.0.5
NuGet\Install-Package MySheet -Version 1.0.5
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="MySheet" Version="1.0.5" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="MySheet" Version="1.0.5" />
<PackageReference Include="MySheet" />
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 MySheet --version 1.0.5
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: MySheet, 1.0.5"
#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 MySheet@1.0.5
#: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=MySheet&version=1.0.5
#tool nuget:?package=MySheet&version=1.0.5
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
MySheet
Thanks
Icon author: Excel icons created by Freepik - Flaticon
Contacts
To report a bug or make a request, send an email to: microboz_reg-dev@yahoo.com
Examples
Create new Excel package
MySheet.MySheet objXsl = new()
{
Creator = "Microboz",
Description = "New Excel test !",
Title = "My title",
Subject = "My subject",
Category = "My category",
Keywords = "tag 1, tag 2, tag 3"
};
MySheet.WorkSheet objWs = objXsl.CreateWorkSheet("Test");
objWs.AddCell(
new Point(4, 4),
new Cell(
"TEST STYLE",
new()
{
Border = new Cell.StyleInfo.BorderInfo(true, Cell.StyleInfo.BorderInfo.BorderSize.medium, Color.Red),
BgColor = Color.Yellow,
FgColor = Color.Blue,
Font = new Font("Arial", 20),
TextAlignment = Cell.StyleInfo.TextAlign.center
}
)
);
objWs.AutoFitColumns();
byte[] bXslx = objXsl.Save();
File.WriteAllBytes(@"C:\myExcel\test.xlsx", bXslx);
objXsl.Dispose();
Load Excel package
MySheet.MySheet objXsl = new();
objXsl.Load(File.ReadAllBytes(@"C:\myExcel\test.xlsx"));
objXsl.Dispose();
Import / Export
MySheet.MySheet objXsl = new();
// Load Excel
objXsl.Load(File.ReadAllBytes(@"C:\myExcel\test_src.xlsx"));
// Export WorkSheet into datatable
MySheet.WorkSheet objWs = objXsl.GetWorkSheet(0);
DataTable dt = objWs.ExportToDataTable(true);
// Create new WorkSheet ad import data from datatable
MySheet.WorkSheet objWs2 = objXsl.CreateWorkSheet("second");
objWs2.ImportFromDataTable(dt);
objWs2.AutoFitColumns();
// Export all sheets into dataset
DataSet ds = objXsl.ExportToDataSet(true);
// Remove first worksheet
objXsl.RemoveWorkSheet(0);
// Finalize
File.WriteAllBytes(@"C:\myExcel\test_dst.xlsx", objXsl.Save());
objXsl.Dispose();
Version history
1.0.5 (2023-05-24)
- Various optimizations.
- Bugfix: styles generation.
1.0.4 (2023-05-18)
- Export WorkSheet to DataTable.
- Export WorkSheet to CSV.
- Import WorkSheet from DataTable.
- Import WorkSheet from CSV.
- Merge cells.
- Remove formula.
- Remove cell.
- Add images.
1.0.3 (2023-04-06)
- Custom columns width.
- Custom rows height.
- Vertical alignment.
- Font attributes (bold/italic/underline).
- Load Excel package.
1.0.2 (2023-03-17)
- Formulas.
- Rows height.
- Fix calculate cell position.
1.0.1 (2023-03-03)
- Added icon.
- Added cell diagonals.
- Various improvements.
1.0.0 (2023-02-27)
- First public release.
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. 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.
-
net7.0
- System.Drawing.Common (>= 7.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.
MySheet
Version: 1.0.5 (2023-05-24)
* Various optimizations.
* Bugfix: styles generation.