VahidN / EPPlus.Core

EPPlus.Core is an unofficial port of the EPPlus library to .NET Core
GNU Lesser General Public License v3.0
370 stars 93 forks source link

export excel with picture in ubuntu #39

Open zqxin45 opened 6 years ago

zqxin45 commented 6 years ago

Summary of the issue

i have a export excel project with picture,os windows is ok ,but linux is wrong with no Unresponsive,the server cpu is increase to 99%,the picture filesize has limit?

foreach (var item in items)
{
      using (var stream = new MemoryStream(item.PicUrlByte))
      {
        var img = Image.FromStream(stream);
        ExcelPicture pic = worksheet.Drawings.AddPicture($"pic{i}", img);
        pic.SetSize(120, 120);
        var row = i - 1;
        pic.SetPosition(row, 20, 0, 10);
        worksheet.Row(i).Height = 120;
       }
}

Output:

Exception message:
Full Stack trace:
VahidN commented 6 years ago

v1.5.4 uses the official System.Drawing.Common for .NET Core 2.0. Give it a try.

dotnet add package EPPlus.Core --version 1.5.4 
piyusher commented 5 years ago

i face the same issue even after using 1.5.4