Spire When Pdf-ing an excel file it leaves some formulas as System Object

0 votes

My WPF programme fills in data in other sheets using an excel template with preset formulae, and the preset formulas then use the data from the other sheet to display it on the main page.

The issue is that while most formulas pass when I automatically PDF the excel, some others give me a System.

errors such as object[][] or others. However, it operates when I view the excel file containing the dataset.

The formulas with an if() statement to eliminate all non-zero values in a range like this are the ones that work and those without.

=TEXTJOIN("
", TRUE, TEXT(IF(Details!O:O>0,Details!O:O,""), "HH:MM"))

Functions like this work:

=TEXTJOIN("
",TRUE,Details!D:D)

How do I get Spire.xls to PDF the right format?

Nov 25, 2022 in Others by Kithuzzz
• 38,000 points
1,007 views

1 answer to this question.

0 votes

Since you tested the Excel file and determined that it functions well, the issue is probably with the Spire rendering.

Of course, you can submit a bug there, but it might not be fixed right away.

Instead of utilizing that if the part in the formula, you might want to consider applying a number format to the cells that contain zero values.

If Spire implements ClosedXML correctly, something like this could occur when writing with it:

worksheet.Cell(row, column).Style.NumberFormat.Format = "#,##0;[Red]-#,##0;\"\";@";

Formating possibilities are somewhat documented by Microsoft, take a look over there.

answered Nov 25, 2022 by narikkadan
• 63,600 points

Related Questions In Others

0 votes
1 answer

What does it mean when owner is None on an AWS S3 object?

S3 Object Ownership is an Amazon S3 ...READ MORE

answered Mar 15, 2022 in Others by gaurav
• 23,260 points
1,463 views
0 votes
0 answers

Creating an Instagram bot with reading an excel file and posing on Instagram, but some of words can not be read properly

from instabot import Bot import openpyxl import smtplib bot = ...READ MORE

Sep 26, 2022 in Others by Kithuzzz
• 38,000 points
847 views
0 votes
1 answer

Create Excel file and save as PDF.

Office 2013 still has the Interop library and ...READ MORE

answered Oct 11, 2022 in Others by narikkadan
• 63,600 points
1,422 views
0 votes
1 answer

How to open an Excel Online document as a PDF

In light of your comment above, I ...READ MORE

answered Oct 18, 2022 in Others by narikkadan
• 63,600 points
546 views
0 votes
1 answer

Print chosen worksheets in excel files to pdf in python

In the simplest form: import win32com.client o = win32com.client.Dispatch("Excel.Application") o.Visible ...READ MORE

answered Sep 24, 2022 in Others by narikkadan
• 63,600 points
3,629 views
0 votes
1 answer

Java Spring - Writing Excel file and converting to PDF

Since you are using Spring I suggest ...READ MORE

answered Sep 26, 2022 in Others by narikkadan
• 63,600 points
2,653 views
0 votes
1 answer

Convert Excel to PDF issue with documents4j

MS Excel may not always be used ...READ MORE

answered Sep 26, 2022 in Others by narikkadan
• 63,600 points
1,535 views
0 votes
1 answer

Converting all tabs of excel sheet to PDF

Using VBA, try it like this, for ...READ MORE

answered Sep 26, 2022 in Others by narikkadan
• 63,600 points
1,763 views
0 votes
1 answer

How to scrape the specific text from kworb and extract it as an excel file?

The best practice to scrape tables is ...READ MORE

answered Feb 18, 2023 in Others by narikkadan
• 63,600 points
800 views
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP