I am using the custom format string “#,##0.0__;-#,##0.0__;0.0__;—__” in my Excel template for some data that I want to output. Some of the data I am outputting is numeric and some of it is text. From my custom format string that I defined, I would expect that my text data output would appear as “—” with two blank spaces to the right. Excel is displaying the text data correctly, but when I export the workbook to PDF, I see the actual text instead of “—”.
Hi,
Thanks for your posting and using Aspose.Cells for .NET.
Please download and use the latest version:
Aspose.Cells
for .NET v7.1.2.2
and let us know your feedback.
If the problem still occurs, then please provide us your sample runnable project to replicate this issue.
That new version doesn’t work for me. I get the following error message
when I attempt to include a reference to the dll in my code (I have
verified that I built with version 7.1.2.2):
Could not load file or assembly ‘Aspose.Cells, Version=7.1.2.0,
Culture=neutral, PublicKeyToken=716fcc553a201e56’ or one of its dependencies.
The located assembly’s manifest definition does not match the assembly
reference. (Exception from HRESULT: 0x80131040)
I have reverted to the previous 7.1.2.0 version, and I am attaching
versions of my Excel and PDF documents so that you can see the error. (Actually it’s 2 errors.)
The first error is in the June 2004 value in the top data table. Note that in the excel output it is correctly displaying as 0.0 but in the pdf output it is displaying as -0.0.
The second related error (I am assuming also having to do with the pdf output not picking up on the excel cell formatting) is that my NULL data values are being correctly formatted as “—” by excel but in the PDF output they are being shown as NULL.
Hi,
You don’t see the “-0.0” value for June 2004 in the returns table at the top of the PDF and “0.0” in the corresponding value in the Excel spreadsheet? I don’t know if it makes a difference but I am using Excel 2010. Also, I checked the advanced option “Set precision as displayed” in my excel template and it’s picking that up for me when I open the excel file. If you uncheck this option you will see a "-0.0 in the Excel spreadsheet as well. I will attempt linking to the 7.1.2.2 and will let you know if I find a difference, but I suspect it will still have the same issue.
Hi,
Could there be something you are doing differently between going directly from the in-memory version of the Excel spreadsheet to PDF compared to going from an actual Excel file to PDF? Because even with the latest version 7.1.2.3 I am still getting the “-0.0” in the PDF output for June 2004.
Hi,
Yes, it also works fine for me when opening the spreadsheet directly, but when working with the spreadsheet in-memory (without actually saving it to disk first) and then exporting to PDF, I am still getting the “-0.0” in the output. Here is the logic I use to export the in-memory workbook to PDF that I modified to use the excel file instead as input. If you use this sample code below you should see the “-0.0” when you export it to PDF:
Workbook wb = new Workbook(@“e:\test2\14335.xls”);
//evaluate worksheet formulas (otherwise they won’t be represented in the pdf output)
wb.CalculateFormula();
//make all sheets invisible except for the first worksheet
for (int i = 1; i < wb.Worksheets.Count; i++)
wb.Worksheets[i].IsVisible = false;
wb.Save(this.Response, “QuantSheet.pdf”, ContentDisposition.Attachment, new PdfSaveOptions());
Maybe the problem’s in “CalculateFormula”. Anyway, if you use this test code you should be able to see the problem.
Hi,
Hi,
Please download and try this fix: Aspose.Cells for .NET v7.1.2.4
But we are still working on right alignment.
Yes I see the -0.0 is no longer an issue but the “—” values are not aligned properly. I’m assuming this is what you were referring to. Just let me know when that part is fixed as well. Thanks.
Any update yet on the right-alignment issue? We won’t be able to release this to production until all of the formatting issues are worked out.
Hi,
We are working on rebuild convert object to string value with number format.
You should wait for this feature.
Also, I have logged your comment in our database against the issue id: CELLSNET-40505
Hi,
We have fixed this issue. Please download and try the latest version: Aspose.Cells for .NET v7.1.2.7
Well, I didn’t have to wait long! Thanks for the quick turn around on this. Works perfectly.
The issues you have found earlier (filed as CELLSNET-40505) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by aspose.notifier.