According to what you are asking me to send. These are the files:
• DemoReport.xlsx: Is the excel file I try to convert to PDF. Is a dynamic filled workbook and the Reports Spreadsheet print area is bound to a dynamic formula instead to a static range. This is the formula: OFFSET(Reports!$B$64,,,Data!$C$4,Data!$F$4),Reports!$B$363:$BB$395
• DemoReport.pdf is a Pdf generated directly from Excel and is how Spire Xls should generate the pdf output file.
• DemoReportOutput.pdf is the actual pdf generated by spire xls with the provided code
Code used to produce the pdf:
- Code: Select all
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Spire.Xls;
namespace Test
{
[TestClass]
public class UnitTestToPdf
{
[TestMethod]
public void TestToPdf()
{
Workbook wbk = new Workbook();
wbk.LoadFromFile(@"c:\temp\DemoReport.xlsx");
wbk.SaveToFile(@"c:\temp\DemoReportOutput.pdf", FileFormat.PDF);
}
}
}
Best regards.
Manuel