Hi,
I am getting "Parameter is not valid" exception while converting Excel document to Image with AutoFitRows option. Please find my code for my reference below.
Workbook wb = null;
wb = new Workbook(fileName);
foreach (Worksheet ws in wb.Worksheets)
{
AutoFitterOptions autoFitterOptions = new AutoFitterOptions();
autoFitterOptions.AutoFitMergedCells = true;
autoFitterOptions.IgnoreHidden = true;
autoFitterOptions.OnlyAuto = true;
sheet.AutoFitRows(autoFitterOptions);
}
WorkbookRender bookRender = new WorkbookRender(_workBook, _printOptions);
bookRender.ToImage(outputFile); //Getting exception in this line
Please guide me to fix this issue.
Thanks,
Dhivya