Here is a sample code to reproduce (adjust the filenames…):
var file = new ExcelFile();
var sheet = file.Worksheets.Add("1");
sheet.Cells["A1"].Value = "A1";
var range = sheet.Cells.GetSubrangeAbsolute(0, 0, 5, 5);
range.Style.Borders.SetBorders(MultipleBorders.Outside, SpreadsheetColor.FromName(ColorName.Black), LineStyle.Medium);
file.Save(@"d:\Temp\TestPdfExport.xlsx");
var pdfOptions = new PdfSaveOptions();
file.Save(@"d:\Temp\TestPdfExport.pdf", pdfOptions);
Result in XLSX is OK:
But in PDF, only cell A1 is displayed:
Do I need to set some more settings or is it just a bug in the library?
P.S. As a workaround, it helps if I set
sheet.Cells["F6"].Value = "";