You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 9, 2020. It is now read-only.
Write a detailed description of your issue.
When trying to call AutoFitColumns on a range that includes data exceeding ~32000 characters, Graphics.MeasureStrings throws a generic GDI+ exception. This applies even when supplying the method with a max length.
System.Runtime.InteropServices.ExternalException
HResult=0x80004005
Message=A generic error occurred in GDI+.
Source=System.Drawing.Common
StackTrace:
at System.Drawing.Graphics.MeasureString(String text, Font font, SizeF layoutArea, StringFormat stringFormat)
at OfficeOpenXml.ExcelRangeBase.AutoFitColumns(Double MinimumWidth, Double MaximumWidth)
Attach a test to reproduce your issue, if it is a bug or unexpected behaviour. This is very important.
Apologies for incomplete code. I can't share the code I'm working with. This seems to be all that's necessary to reproduce the bug.
ws.Cells[1, 1].Value = new string('a', 50000);
ws.Cells[1, 1].AutoFitColumns();
@JanKallman Has this fully made it into the repo yet, we are using v4.5.3.1. If not (not implying anything) is there an easy work around, apart from truncating every cell value we supply of course
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Write a detailed description of your issue.
When trying to call AutoFitColumns on a range that includes data exceeding ~32000 characters, Graphics.MeasureStrings throws a generic GDI+ exception. This applies even when supplying the method with a max length.
EPPlus/EPPlus/ExcelRangeBase.cs
Line 909 in 30cdb0d
Attach a test to reproduce your issue, if it is a bug or unexpected behaviour. This is very important.
Apologies for incomplete code. I can't share the code I'm working with. This seems to be all that's necessary to reproduce the bug.
Related
The text was updated successfully, but these errors were encountered: