- 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