SixLabors.Fonts Issues Exporting Datagridview to Excel

0
0

Hi Team,

https://wisej.com/support/question/export-datagridview-to-excel

The link above has a solution for exporting datagridview to excel. However, i am getting an error message that is related to SixLabors.Fonts.

I have installed SixLabors.Font nugget package but the issue is not resolved. What could i be missing, and would SixLabors.Fonts package mean i would have to purchase another license?

The error message is:
*****************************************************************************
The type initializer for ‘SixLabors.Fonts.Tables.TableLoader’ threw an exception.

at SixLabors.Fonts.FontCollection.AddImpl(Stream stream, CultureInfo culture, FontDescription& description) at ClosedXML.Graphics.DefaultGraphicEngine.AddEmbeddedFont(FontCollection fontCollection) at ClosedXML.Graphics.DefaultGraphicEngine..ctor(String fallbackFont) at ClosedXML.Graphics.DefaultGraphicEngine.<>c.<.cctor>b__31_0() at System.Lazy`1.CreateValue() — End of stack trace from previous location where exception was thrown — at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Lazy`1.get_Value() at ClosedXML.Excel.XLWorkbook..ctor(LoadOptions loadOptions) at MestiSti.frmMstEntities.ExportDataGridView() in D:\Projects\Web\Wisej\MestiSti\Forms\frmMstEntities.vb:line 674 at Wisej.Web.ButtonBase.OnClick(EventArgs e) at Wisej.Web.Button.PerformClick() at Wisej.Web.ButtonBase.ProcessExecuteWebEvent(WisejEventArgs e) at Wisej.Web.Control.Wisej.Core.IWisejComponent.Event(WisejEventArgs e) at Wisej.Web.Application.ProcessWebEvent(WisejEventArgs e) at Wisej.Web.Application.OnWebEvent(WisejEventArgs e) at Wisej.Web.Application.Wisej.Core.IWisejComponent.Event(WisejEventArgs e) at Wisej.Core.ComponentManager.DispatchEvents(Session session, ICollection events) at Wisej.Core.ResponseManager.<>c__DisplayClass25_0.b__0() at Wisej.Core.IWisejSynchronizedImplementation.Lock(IWisejSynchronized target, Action action) at Wisej.Core.ResponseManager.ProcessRequest(ServiceType service, Object message)

 

  • You must to post comments
0
0

Hi Nicholas,

I have attached an updated sample, please let me know if it works for you!

Best regards,
Alaa

//

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.