Hello,
I’m trying to convert Excel to PDF, but I keep getting this error.
Chart must have labels
It actually contains two graphs that have neither a label nor a legend, but adding them doesn’t work anyway.
Has anyone encountered similar problems?
The version is up to date it seems to me:
<package id="GemBox.Spreadsheet" version="45.0.1206" targetFramework="net472" />
Thanks
Hi Pamela,
I’m unable to reproduce this issue.
Can you send us your Excel file so that we can take a look at it?
Regards,
Mario
I’cannot upload an xlsx file into this message, how can send you my test file?
This is my code
SpreadsheetInfo.SetLicense(enumConst.GemBoxLicenze);
var workbook = ExcelFile.Load(@"~\TestChartGembox.xlsx");
var opz = new PdfSaveOptions() { SelectionType = SelectionType.EntireFile };
foreach (var s in workbook.Worksheets)
{
s.PrintOptions.FitWorksheetWidthToPages = 1;
s.PrintOptions.FitWorksheetHeightToPages = 1;
}
var stream = new MemoryStream();
workbook.Save(stream, opz);
Hi,
This chart labels issue was resolved and the fix is now available in the latest publicly released bugfix version for GemBox.Spreadsheet.
Visit our BugFixes page or NuGet.
Regards,
Mario