- Home
- Forum
- ASP.NET Core - EJ 2
- pdf Missing Min/Max Range Lines in Chart After Excel to PDF Conversion
pdf Missing Min/Max Range Lines in Chart After Excel to PDF Conversion
Hello
When converting an Excel file to PDF format, the maximum/minimum range represented by two red lines is missing from the chart (see attachment), even though the lines are correctly displayed when exporting to Excel in English.
Thank you
Attachment: 10145_561719a4.zip
Hi Team,
We have attached a sample that resolves the reported issue. Please refer to the sample and let us know if it resolves the problem on your end. If you have any further queries, please feel free to contact us.
Regards,
Karthika S.
Attachment: ExceltoPDFChart_2bd75195.zip
Hello
I tested your code: it works correctly with the Excel file I initially provided.
However, it doesn't work with another Excel document. Interestingly, if I open that file and simply press Ctrl+S (save), the process works fine afterward.
I'm attaching our Excel template that we use to generate the file before converting it to PDF.
Could you please check if there’s any difference or something that needs to be fixed in this template?
Thank you in advance for your help.
Attachment: DOC_DES_CERTIFICATS_METROLOGIES_(1)_c7c4c123.xlsx
Hi Aitbouhou,
We have reproduced the reported issue on our end.
We are currently validating it. We will share the validation details on July 9th, 2025.
Regards,
Karthika S.
Hi Aitbouhou,
We have
confirmed the issue “Chart series does not render properly in
PDF conversion when the series category value and count differ” as a
defect in our product and we will include the fix in weekly release
on July 29, 2025.
Please
use the below feedback link to track the status
of the reported bug.
Chart
series does not render properly in PDF conversion when the series category
value and count differ in ASP.NET Core | Feedback Portal
Note: If you require a patch for the reported issue in any of our Essential Studio Main or SP release version, then kindly let us know the version, so that we can provide a patch in that version based on our SLA policy.
Disclaimer: “Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization.”
Regards,
Aravazhi Rajendran
Hi Aitbouhou,
We regret for the inconvenience caused. Unfortunately, we were unable to include the fix in this weekly NuGet release.
We will include the fix in our upcoming weekly release on August 5th, 2025.
Regards,
Karthika
Hi Aitbouhou,
Sorry for the inconvenience caused. Unfortunately, we were unable to include the fix in this weekly NuGet release.
We will include the fix in our upcoming weekly release on August 12th, 2025.
Regards,
Karthika
Hi Aitbouhou,
Sorry for the inconvenience caused. Unfortunately, we were unable to include the fix in this weekly NuGet release.
We have prepared a custom NuGet in latest version 30.2.5 to resolve the issue, the NuGet is attached below. Please review it, and we will include the fix in our upcoming weekly release on August 19th, 2025.
Regards,
Karthika
Attachment: syncfusion.xlsiorenderer.net.core.30.2.5_bdcfee31.zip
Hi Aitbouhou,
We regret for the continued inconvenience caused. Unfortunately, we were unable to include the fix in this weekly NuGet release.
We will include the fix in our upcoming weekly release on August 26th, 2025.
Regards,
Santip Raja.
Hi Aitbouhou,
We have included the fix to resolve the issue "Chart series does not render properly in PDF conversion when the series category value and count differ" in our weekly NuGet release version 30.2.7. Kindly upgrade your Syncfusion packages to this new 30.2.7 version and let us know if the issue is resolved.
NuGet Package: NuGet Gallery | Syncfusion.XlsIORenderer.Net.Core 30.2.7
Root cause for this issue:
When converting an Excel document to PDF, the chart series are not rendered properly. This issue occurs because XlsIO does not properly handle cases where the chart series values and counts differ.
Regards,
Karthika
Hello,
I just tested the solution with version 30.2.7 and even with the latest version, but it still doesn’t work.
Hi Atibouhou,
We have checked the sample with version 30.2.7 where the issue is resolved. Please check the attached sample if the issue is resolved on your end.
Attachment: ExceltoPDFChart_f2ae8b43.zip
Hello
I tested your example, but it didn’t work. I am attaching my code as well as the Excel and PDF examples.
thank you
using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
string excelPath = @"69e46d35-117a-4448-abd4-240195544f58.xlsx";
string pdfPath = @"test.pdf";
FileStream excelStream = new FileStream(excelPath, FileMode.Open, FileAccess.Read);
IWorkbook workbook = application.Workbooks.Open(excelStream);
foreach (var sheet in workbook.Worksheets)
{
List<IRange> lstCells = sheet.UsedCells.Where(x => x.HasFormula).ToList();
sheet.EnableSheetCalculations();
sheet.CalcEngine.GetValueFromArgPreserveLeadingZeros = true;
foreach (var cell in lstCells)
{
try
{
cell.Value = cell.CalculatedValue;
}
catch
{
// wrong formula inside
}
}
sheet.DisableSheetCalculations();
}
//Initialize XlsIO renderer.
XlsIORenderer renderer = new XlsIORenderer();
//Convert Excel document into PDF document
PdfDocument pdfDocument = renderer.ConvertToPDF(workbook);
//Create the MemoryStream to save the converted PDF.
MemoryStream pdfStream = new MemoryStream();
//Save the converted PDF document to MemoryStream.
pdfDocument.Save(pdfStream);
pdfStream.Position = 0;
FileStream outputStream = new FileStream(pdfPath, FileMode.Create, FileAccess.Write);
pdfDocument.Save(outputStream);
excelStream.Dispose();
outputStream.Dispose();
}
Attachment: test_ce552ad5.zip
Hi Atibouhou,
The Excel file supplied in the previous update differs from the initially reported one. Nonetheless, we have replicated the issue and will provide validation details on 19 December 2025.
Regards,
Gowtham.
Hi Atibouhou,
Upon further analysis, we identified that the issue occurred due to an incorrect calculation of the calculated value. We have reported this to the concerned team and require an additional two days to validate the issue.
In the meantime, you can use the sample without setting the calculated value. We have provided a code snippet to remove the calculated value usage and included a modified sample that works as expected.
Code Snippet:
using (ExcelEngine excelEngine = new ExcelEngine()) { IApplication application = excelEngine.Excel; application.DefaultVersion = ExcelVersion.Xlsx;
string excelPath = @"69e46d35-117a-4448-abd4-240195544f58.xlsx"; string pdfPath = @"test.pdf";
FileStream excelStream = new FileStream(excelPath, FileMode.Open, FileAccess.Read); IWorkbook workbook = application.Workbooks.Open(excelStream); //Removed the calculation codes here //Initialize XlsIO renderer. XlsIORenderer renderer = new XlsIORenderer();
//Convert Excel document into PDF document PdfDocument pdfDocument = renderer.ConvertToPDF(workbook);
//Create the MemoryStream to save the converted PDF. MemoryStream pdfStream = new MemoryStream();
//Save the converted PDF document to MemoryStream. pdfDocument.Save(pdfStream); pdfStream.Position = 0;
FileStream outputStream = new FileStream(pdfPath, FileMode.Create, FileAccess.Write); pdfDocument.Save(outputStream);
excelStream.Dispose(); outputStream.Dispose();
} |
Please use this code snippet/attached sample and kindly let us know the issue is resolved or not.
Attachment: ExceltoPDFChart_(1)_7e68f.zip
Hi Atibouhou,
We have checked and confirmed the reported issue "SUBSTITUTE formula returns an incorrect value for the decimal separator in CalcEngine" as a defect. We have logged a bug, and We will fix this issue and include it in our upcoming NuGet release which is scheduled on 13 January 2026.
You can track the status of this report through the following feedback link,
Feedback Link: SUBSTITUTE formula returns an incorrect value for the decimal separator in CalcEngine in WinForms | Feedback Portal
Note: The provided feedback link is private, and you need to log in to view this feedback.
We will let you know once it is released. We appreciate your patience until then.
Disclaimer: Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization.
Hi Atibouhou,
We sincerely apologize for the inconvenience.
We have fixed the issue where the SUBSTITUTE formula returned an incorrect value for the decimal separator in CalcEngine. However, the chart is still not rendering correctly because the calculated values of some other dependent cells used by the chart are incorrect. Due to this, the fix for the reported issue was not fully included in today’s NuGet package release as promised. We will validate these issues and share further details on January 14, 2026.
Regards,
Santip Raja.
Hi Atibouhou,
We are currently working to resolve the reported issue where the chart is not rendering in the PDF. The fix will be included in our upcoming weekly NuGet release, scheduled for January 27, 2026.
We will notify you once it is released. We appreciate your patience during this time.
Regards,
Santip Raja.
Hi Atibouhou,
We sincerely apologize for the inconvenience. Unfortunately, the fix for the issue related to "SUBSTITUTE formula returns an incorrect value for the decimal separator in CalcEngine" was not included in today’s NuGet package release as promised.
While the issue has been addressed and a fix implemented, we encountered some issues during the testing phase, which prevented its inclusion in the release. We will fix these issues and include the fix in our upcoming Volume 4 Service Pack release which is scheduled on 4th February.
Regards,
Santip Raja.
Hi Atibouhou,
We are glad to announce that our weekly patch release (32.2.4) is rolled out. We have included the fix for the reported “SUBSTITUTE formula returns an incorrect value for the decimal separator in CalcEngine” issue in this release. So, kindly upgrade your package version to the latest to avail of these changes (32.2.4).
Package Link: NuGet Gallery | Syncfusion.XlsIORenderer.Net.Core 32.2.4
Feedback Link: SUBSTITUTE formula returns an incorrect value for the decimal separator in CalcEngine in WinForms | Feedback Portal
Issue Root Cause:
While IF formula calculation, argument values containing a comma (,) with a decimal separator as (.) were mistakenly considered as numbers instead of text, causing incorrect results. To resolve this, a condition was added ,values containing numbers with a comma are treated as text when the decimal separator is not a comma. This fix ensures the formula now returns the correct result.
We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you require any further assistance.
Regards,
Santip Raja.
Hello
I just tested version 32.2.4, but it doesn't always work.
There is my code
using (ExcelEngine excelEngine = new ExcelEngine())
{
// Initialize application
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
// Load Excel file
using (FileStream excelStream = new FileStream("6e847e17-ebee-48ba-8718-fea8371cfb7c.xlsx", FileMode.Open, FileAccess.Read))
{
IWorkbook workbook = application.Workbooks.Open(excelStream);
foreach (var sheet in workbook.Worksheets)
{
List<IRange> lstCells = sheet.UsedCells.ToList();
sheet.EnableSheetCalculations();
sheet.CalcEngine.GetValueFromArgPreserveLeadingZeros = true;
foreach (var cell in lstCells)
{
try
{
cell.Value = cell.CalculatedValue;
}
catch
{
// wrong formula inside
}
}
sheet.DisableSheetCalculations();
}
// Initialize renderer
XlsIORenderer renderer = new XlsIORenderer();
// Convert Excel to PDF
using (PdfDocument pdfDocument = renderer.ConvertToPDF(workbook))
{
using (FileStream pdfStream = new FileStream("C:\\data Ahmed\\tickets\\10145\\resulats.pdf", FileMode.Create, FileAccess.Write))
{
pdfDocument.Save(pdfStream);
}
}
}
}
Hi BERNARD,
Thank you for the update and for sharing your code example.
To investigate this issue further, we will need the input Excel document you are using. Having the actual file will help us reproduce the issue accurately on our end and provide you with a quicker, more precise solution.
Please share the input document whenever possible. We will handle the file with complete confidentiality and use it only for debugging purposes.
Let us know once it is available, and we will proceed with our analysis.
Regards,
Santip Raja.
Hi Santip Raja.
There is my file EXCEL
Thank you
Attachment: 6e847e17ebee48ba8718fea8371cfb7c_de4942cd.xlsx
Hi BERNARD,
We are unable to reproduce the issue at our end. We have attached the working sample tried at our end. We request you modify the sample to reproduce the issue. It will help us to proceed further and provide you a solution earlier.
Regards,
Santip Raja.
Attachment: SampleNET8_448252ea.zip
- 23 Replies
- 6 Participants
-
AA Aitbouhou Adam
- Jul 1, 2025 01:55 PM UTC
- Feb 12, 2026 08:32 AM UTC