Dear Aspose Support Team,
I am encountering an issue while converting an Excel workbook to PDF using Aspose.Cells. My goal is to make all comments in the workbook visible and print them in place when converting to PDF.
I am using the following code to set all comments to be visible and to print them in place:
Workbook workbook = new Workbook(sourceFile);
// Set all comments to visible
foreach (var worksheet in workbook.Worksheets)
{
foreach (var comment in worksheet.Comments)
{
comment.IsVisible = true;
}
worksheet.PageSetup.PrintComments = PrintCommentsType.PrintInPlace;
}
This code works as expected for notes in Excel, but it does not work for comments. When I use PrintCommentsType.PrintInPlace
, the comments do not appear in the PDF as expected.
However, if I switch to PrintCommentsType.PrintSheetEnd
, all comments and notes are printed at the end of the sheet, which is not the desired outcome. I need the comments to be printed in place, next to their corresponding cells, within the PDF.
Could you please provide guidance on how to ensure that comments are printed in place using PrintCommentsType.PrintInPlace
when converting an Excel workbook to PDF?
TestExcel_2Pages_2Workbooks with comments.zip (5,6 MB)
@emrekaya58,
Thanks for the template XLSX file and details.
After an initial test, I am able to reproduce the issue as you mentioned by using your template XLSX file. I found an issue with printing all comments/notes of the worksheets in place when converting to PDF.
We require thorough evaluation of the issue. We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): CELLSNET-56064
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.
@emrekaya58
Place.png (11.3 KB)
Please check above attached image, PrintInPlace only works for notes. So when PrintCommentsType.PrintInPlace is set, only notes will be printed and comments are ignored.
Aspose.Cells works as MS Excel.
Please confirm if you really need to achieve a different output effect than Excel. Because we need to design special parameters to achieve this requirement and there is no reference of Excel, it is hard for us to determine how to output comments in place.
It makes sense to keep the comments under the Excel file and include the notes directly within the Excel. This way, we won’t lose any of the comments in the Excel.
@emrekaya58
Thank you for your feedback. We will further investigate your issue and inform you promptly of any updates.
@emrekaya58
Your issue(CELLSNET-56064) has been resolved and the fixed functionality will be released with version 24.9.
We have added related functions that may meet your needs. You can use the enumeration value PrintWithThreadedComments for verification.
Here is the resulting file generated using the latest function:
CELLSNET-56064.pdf (1.2 MB)
The issues you have found earlier (filed as CELLSNET-56064) have been fixed in this update. This message was posted using Bugs notification tool by johnson.shi