In this Excel file, I have a strikethrough cell, but in the PDF, the cell is not strikethrough.

I'am using C# code to convert an Excel file to pdf file, 

In this Excel file, I have a strikethrough cell, but in the PDF, this cell is not strikethrough.

This is my code C#.

Thank you.

------------------------------------------------------------------------------------------

     newRelativeFilePath = "RI - JA-8336 (CM).xlsx";

     System.Globalization.CultureInfo.CurrentCulture =

                System.Globalization.CultureInfo.GetCultureInfo("fr-FR");


     XlsIORendererSettings settings = new XlsIORendererSettings

     {

         EmbedFonts = true

     };


     using (ExcelEngine excelE = new ExcelEngine())

     {

         IApplication application = excelE.Excel;

         application.DefaultVersion = ExcelVersion.Xlsx;


         //Initialize XlsIO renderer.

         XlsIORenderer renderer = new XlsIORenderer();


         using (FileStream excelStream = new FileStream(newRelativeFilePath, FileMode.Open, FileAccess.Read))

         {

             IWorkbook wb = application.Workbooks.Open(excelStream);

             ExcelTemplater.CalculateFormulaForPdf(wb);


             //Convert Excel document with charts into PDF document

             using (PdfDocument pdfDocument = renderer.ConvertToPDF(wb, settings))

             {

                 using (Stream s = new FileStream(newRelativeFilePathPdf, FileMode.Create, FileAccess.ReadWrite))

                 {

                     if (data!.ContainsKey("annexes"))

                     {

                         AddAnnexes(JArray.Parse(data["annexes"].ToString()), pdfDocument);

                     }

                     pdfDocument.Save(s);

                 }

             }

         }

     }


Attachment: 13012025_1e15f4ab.zip

2 Replies

AH Alex Harson James Henso Syncfusion Team January 15, 2025 10:39 AM UTC

Hi Adam,

 

We are able to reproduce the reported issue at our end and currently validating it. We will share the validation details on Jan 17th, 2025.

 

Regards,

Alex Harson James H



AS Atchaya Sekar Syncfusion Team January 17, 2025 05:12 PM UTC

Hi Adam,

 

Currently, XlsIO does not support the pattern fill cell style during Excel to PDF conversion. We have already logged a feature request for this support. And we do not have any immediate plans to implement these features, and we will implement this support in any of our upcoming releases. We will let you know when this feature is implemented. In the meantime, please follow the feedback link provided below for updates.

 

Feedback link: Pattern fill cell style support in Excel to PDF conversion in ASP.NET Core | Feedback Portal

 

Regards,

Atchaya S.


Loader.
Up arrow icon