Skip to content
This repository has been archived by the owner on Jan 25, 2019. It is now read-only.

Commit

Permalink
EPPlus 4.5.0-beta Added .NET Core Support
Browse files Browse the repository at this point in the history
  • Loading branch information
VahidN committed Nov 12, 2017
1 parent 4cbb64b commit f0d2602
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,8 @@ sudo apt-get install libgdiplus
```

- The original EPPlus project has been [moved to Github](https://github.com/JanKallman/EPPlus/). Please post its development related issues/pull requests at there. The main purpose of the current project is just providing an existing EPPlus for .NET Standard. There will be no further developments here.


News:
-----------------
[EPPlus 4.5.0-beta Added .NET Core Support](https://github.com/VahidN/EPPlus.Core/issues/37)
41 changes: 41 additions & 0 deletions src/EPPlus.Core.FunctionalTests/SampleApp/Issue34.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
using System;
using System.IO;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using OfficeOpenXml;

namespace EPPlus.Core.FunctionalTests.SampleApp
{
[TestClass]
public class Issue34
{
[TestMethod]
public void RunIssue34()
{
string file = Path.Combine("bin", "issue34.xlsx");
const string password = "EPPlus";
using (var package = new ExcelPackage())
{
var worksheet = package.Workbook.Worksheets.Add("Employee");

worksheet.Cells[1, 1].Value = "ID";
worksheet.Cells[1, 2].Value = "Name";
worksheet.Cells[1, 3].Value = "Gender";
worksheet.Cells[1, 4].Value = "Salary (in $)";

worksheet.Cells[2, 1].Value = 1000;
worksheet.Cells[2, 2].Value = "Jon";
worksheet.Cells[2, 3].Value = "M";
worksheet.Cells[2, 4].Value = 3000;

package.SaveAs(new FileInfo(file), password); //default encryption (AES128)
}

using (var package = new ExcelPackage(new FileInfo(file), password))
{
var worksheet = package.Workbook.Worksheets[1];
Console.WriteLine(worksheet.Cells[2, 1].Value);
Assert.AreEqual("1000", worksheet.Cells[2, 1].Value.ToString());
}
}
}
}

0 comments on commit f0d2602

Please sign in to comment.