Excel hidden rows were incorrectly showing when saving as PDF

One more question, excel hidden rows were showing when saving as pdf.Now we added the IgnoreHidden = true which seems to work,is that the right solution?

Before
worksheet.AutoFitRows(afo);

Now

                                Aspose.Cells.AutoFitterOptions afo = new Aspose.Cells.AutoFitterOptions
                                {
                                    IgnoreHidden = true
                                };
                                worksheet.AutoFitRows(afo);

@philip.thomas,

Thanks for the code segment and details.

When you simply apply auto-fit rows/cols operation, the hidden rows/cols are not hidden anymore. So, you are doing right to use the option to not to unhide those rows. In the event of any query or issue, feel free to write us, we will be happy to assist you soon.