Spire.XLS is a professional Excel API that enables developers to create, manage, manipulate, convert and print Excel worksheets. Get free and professional technical support for Spire.XLS for .NET, Java, Android, C++, Python.

Sat Jul 25, 2020 5:29 am

I'm converting an excel file to PDF but the print area is bound to a formula range like this =OFFSET(Reports!$B$64,,,Data!$C$4,Data!$F$4),Reports!$B$363:$BB$395. The resulting PDF is ignoring this formula and generating a PDF with all the selected spreadsheet area.

Is there a way for Spire Xls to solve the formula for the print area or there's a way to generate a range from the given formula?

Best regards

manoloarbulu
 
Posts: 2
Joined: Sat Jul 25, 2020 5:09 am

Mon Jul 27, 2020 3:59 am

Hello,

Thanks for your post.
To help us investigate your issue more accurately and quickly, please provide your input file, your full testing code, your print result as well as your desired output effect for our reference. You could upload them here or send them to us(support@e-iceblue.com) via email. Thanks in advance.

Sincerely,
Sofia
E-iceblue support team
User avatar

Sofia.Yang
 
Posts: 84
Joined: Tue Jul 14, 2020 1:41 am

Mon Jul 27, 2020 8:45 pm

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
Attachments
SpireXlsSupport.zip
Zip file with files described in the post
(1.62 MiB) Downloaded 216 times

manoloarbulu
 
Posts: 2
Joined: Sat Jul 25, 2020 5:09 am

Tue Jul 28, 2020 7:13 am

Hello,

Thank you for sharing.
I tested your case and reproduced the issue you mentioned. I have logged it into our bug tracking system with the ticket SPIREXLS-2586 for further investigation and fixing. We will keep you informed if there is any update. Sorry for the inconvenience caused.

Sincerely,
Sofia
E-iceblue support team
User avatar

Sofia.Yang
 
Posts: 84
Joined: Tue Jul 14, 2020 1:41 am

Wed Sep 02, 2020 9:41 am

Hello,

Glad to inform you that we just released Spire.XLS Pack Hotfix Version: 10.9.0 which fixed the issue of SPIREXLS-2586, please download it from the following links to test.
Website link: https://www.e-iceblue.com/Download/down ... t-now.html
Nuget link: https://www.nuget.org/packages/Spire.XLS/10.9.0

Sincerely,
Sofia
E-iceblue support team
User avatar

Sofia.Yang
 
Posts: 84
Joined: Tue Jul 14, 2020 1:41 am

Tue Sep 08, 2020 9:40 am

Hello,

Greetings from E-iceblue.
Have you tested the Spire.XLS Pack Hotfix Version: 10.9.0? Does it solve your issue? Thanks in advance for your feedback and time.

Sincerely,
Sofia
E-iceblue support team
User avatar

Sofia.Yang
 
Posts: 84
Joined: Tue Jul 14, 2020 1:41 am

Wed Nov 11, 2020 9:39 am

Hello,

Greetings from E-iceblue.
Did the hotfix version work for you? Could you give us a feedback at your convenience? Thanks in advance.

Sincerely,
Sofia
E-iceblue support team
User avatar

Sofia.Yang
 
Posts: 84
Joined: Tue Jul 14, 2020 1:41 am

Return to Spire.XLS