Hi!
I have encountered an error in conversion xlsx file to pdf using Aspose.Cells v5.2.2.x.
Here is error description:
Aspose.Cells.CellsException: Value cannot be null.
Parameter name: value
at Aspose.Cells.Workbook.Save(String fileName, SaveOptions saveOptions)
at Aspose.Cells.Workbook.Save(String fileName)
at Excel2PdfConversion.Program.Main(String[] args)
Xlsx file is attached. Please note, that conversion didn’t break in previous version of Aspose.Cells (5.1.x).
Best regards,
Alex.
Hi,
Thanks for providing us the template file.
After an initial test converting your file to PDF, I got the error as you mentioned. I have logged your issue into our issue tracking system with an id: CELLSNET-24126. We will figure it out soon.
Thank you.
Thanks, the fix is working.
However, Aspose.Cells breaks sheet into page slightly different than Excel.
See into top-right corner. In Excel there is only one page, in converted PDF - two pages.
Could you fix it?
Best regards,
Alex.
Hi,
<span style=“font-size: 10pt; font-family: “Tahoma”,“sans-serif”; color: black;”>
Well, this issue is related to the specific printer settings or type, please refer
to the attachment. Moreover, <span style=“font-size: 10pt; font-family: “Tahoma”,“sans-serif”; color: black;”>When we use some different printers, the result is different. If you wants 1-page result, please set worksheet.PageSetup to fit to 1 page tall&wide. We think it is difficult to change result according to the printer you are using/installed. We also think there might be some permission issues in some environments. So, we think it is not an issue, please try to set:
<!–[if gte mso 9]>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves/>
<w:TrackFormatting/>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>EN-US</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:EnableOpenTypeKerning/>
<w:DontFlipMirrorIndents/>
<w:OverrideTableStyleHps/>
<w:UseFELayout/>
</w:Compatibility>
<m:mathPr>
<m:mathFont m:val=“Cambria Math”/>
<m:brkBin m:val=“before”/>
<m:brkBinSub m:val="–"/>
<m:smallFrac m:val=“off”/>
<m:dispDef/>
<m:lMargin m:val=“0”/>
<m:rMargin m:val=“0”/>
<m:defJc m:val=“centerGroup”/>
<m:wrapIndent m:val=“1440”/>
<m:intLim m:val=“subSup”/>
<m:naryLim m:val=“undOvr”/>
</m:mathPr></w:WordDocument>
<![endif]–><!–[if gte mso 10]>
<![endif]–>
<span style=“font-size: 10pt; font-family: “Tahoma”,“sans-serif”; color: black;”>worksheet.PageSetup.FitToPagesTall = 1 and worksheet.PageSetup.FitToPagesWide = 1 attributes accordingly before converting to PDF document. It will work fine for your need.
Thanks for your understanding!
I understand your point about different printers. It makes sense.
But imagine a situation:
Report designer creates a lot of different excel reports. Some of them are single-page, some multi-page.
In order to be sure that reports look good in excel and pdf he needs to adjust sizes. To verify this he can only save the report as PDF in Excel or print it using some standard printer (e.g. Microsoft XPS Document Writer).
In both cases this particular document looks fine (fitted in one page), but Aspose works differently.
We cannot use FitToPagesTall and FitToPagesWide settings, because the same conversion code is used for many reports.
So can you adjust conversion process to be more predictable in page breaking?
Best regards,
Alex.
Guys, what do you think about it?
Hi,
I will forward your query to get an answer.
Hi Alex,
We have fixed it, and will release it next week.
Great! Thank you!
The issues you have found earlier (filed as 24126) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by aspose.notifier.