We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

ExcelEngine bugs

Thread ID:

Created:

Updated:

Platform:

Replies:

147629 Sep 18,2019 04:20 AM UTC Sep 19,2019 04:42 PM UTC WPF 1
loading
Tags: XlsIO
John
Asked On September 18, 2019 04:20 AM UTC

  • When converted to PDF, the border line gets thicker, in pdf it gets 1px thick, while it should be around 0.75px thick, pdf should look same as xlsx file.
  • If Excel is not activated, the font gets reset. Eg, write 2 lines in a cell, change its font and make first line bold. Now when you apply marker to it. The fonts will be reset back to Arial or something if excel is not activated. OS : Windows 10
  • The insert:copystyles, doesn't copy the merged cells.


        void TestExcelEngine()
        {
            using (ExcelEngine excelEngine = new ExcelEngine())
            {
                IWorkbook workbook = excelEngine.Excel.Workbooks.Open(System.IO.Path.Combine(System.Windows.Forms.Application.StartupPath, "Template.xlsx"));
                IWorksheet worksheet = workbook.Worksheets[0];


                ITemplateMarkersProcessor marker = workbook.CreateTemplateMarkersProcessor();
                List<Class> list = new List<Class>();
                for (int a = 0; a < 10; a++)
                {
                    list.Add(Class.TestMarkers(a));
                }
                marker.AddVariable("Class", list);
                marker.ApplyMarkers();






                string targetPath = System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory), "Applied.xlsx");
                workbook.Version = ExcelVersion.Excel2007;
                workbook.SaveAs(targetPath);

                ExcelToPdfConverter converter = new ExcelToPdfConverter(worksheet);
                PdfDocument pdfDocument = converter.Convert();
                MemoryStream stream = new MemoryStream();
                pdfDocument.Save(System.IO.Path.ChangeExtension(targetPath, ".pdf"));
            }
        }

Attachment: Template_da57c749.zip

Abirami Varadharajan [Syncfusion]
Replied On September 19, 2019 04:42 PM UTC

Hi John, 
 
Please find the details for your queries below. 
 
Queries 
Details 
When converted to PDF, the border line gets thicker, in pdf it gets 1px thick, while it should be around 0.75px thick, pdf should look same as xlsx file. 
While viewing the converted PDF document, you may find the border lines are little thick when compared to Excel file. This is due to variation between Excel and PDF viewer. We have rendered the border line as per MS Excel behaviour. So, this is not an issue. 
If Excel is not activated, the font gets reset. Eg, write 2 lines in a cell, change its font and make first line bold. Now when you apply marker to it. The fonts will be reset back to Arial or something if excel is not activated. OS : Windows 10 
We are not clear with the issue you are mentioning, we request you to share more details about the issue you are facing along with the issue reproducing sample which will be helpful for us to validate further from our side. 
The insert:copystyles, doesn't copy the merged cells. 
You need to include copymerges to marker variable in order to copy the merged cells while applying template marker. Please refer to below article to know more about this. 
 
 

Regards, 
Abirami 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon