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.

Wed Sep 30, 2015 4:25 pm

Dear Sir,

We purchased a .NET Pro Edition license for Spire.XLS and are currently running v7.8.26.7040.
We have encountered an issue when converting an Excel worksheet to PDF where some cells containing formulas are exported to PDF showing "#VALUE!".

For Example:
The cell A45 (formatted as 'accounting', 2 decimal places, '$') is a simple formula of a subtraction of 2 other cells, however the 2 other cells have more complex formulas:
A45=B65-C65
where:
B65=SUMIF($F$11:$F$41,$A$64:$A$73,$J$11:$J$41)
C65=SUMIF($F$11:$F$41,$A$64:$A$73,$S$11:$S$41)
where: column F is a lookup value and column J the values.

In Excel A45 shows a value of '$46.87' however, in the exported PDF file A45 shows a value of '#VALUE!'

I am using streams to convert the worksheet to PDF:

Code: Select all
var outputPdfDocument = new PdfDocument();
foreach (Worksheet worksheet in workbook.Worksheets.Where(x => worksheetIndexes.Contains(x.Index + 1)))
{
    using (var worksheetStream = new MemoryStream())
    {
        worksheet.SaveToPdfStream(worksheetStream);
        var pdfDocument = new PdfDocument();
        pdfDocument.LoadFromStream(worksheetStream);
        outputPdfDocument.AppendPage(pdfDocument);
    }
}


What can I do to get the Excel formula resultant values in the exported PDF file?

Thank you,
Charles

crushworth@westernforest.com
 
Posts: 6
Joined: Mon May 25, 2015 4:29 pm

Wed Sep 30, 2015 9:31 pm

After further investigation we find that using the 'SUMIF' function in the formula seems to cause the problem. Replacing 'SUMIF' with just a SUM(range) and then performing the PDF conversion looks to work well.

However, we would still like our spreadsheets to contain the 'SUMIF' formulas, so will you fix the XLS->PDF conversion please.

Thank you,
Charles

crushworth@westernforest.com
 
Posts: 6
Joined: Mon May 25, 2015 4:29 pm

Thu Oct 01, 2015 10:05 am

Hello,

Thanks for your inquiry.
Sorry that I didn't reproduced your issue, could you please provide us your sample document here, or send it to us ( Support@E-iceblue.com) Via email ?

Thanks,
Betsy
E-iceblue support team
User avatar

Betsy
 
Posts: 802
Joined: Mon Jan 19, 2015 6:14 am

Thu Oct 01, 2015 3:55 pm

Betsy,

I have sent the spreadsheet and exported pdf file to your Support@E-iceblue.com email address.

Charles

crushworth@westernforest.com
 
Posts: 6
Joined: Mon May 25, 2015 4:29 pm

Fri Oct 02, 2015 1:54 am

Hello,

Thanks for your information. I have reproduced your issue and posted it to our Dev team. We will inform you if there is any progress.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy
 
Posts: 802
Joined: Mon Jan 19, 2015 6:14 am

Fri Oct 23, 2015 8:48 am

Dear Charles,

Thanks for your waiting. Your issue has been fixed, please test Spire.XLS Pack Hotfix Version:7.8.43.

Best Regards,
Betsy
E-iceblue support team
User avatar

Betsy
 
Posts: 802
Joined: Mon Jan 19, 2015 6:14 am

Return to Spire.XLS

cron