i am converting Excel to image like this
Worksheet ws = this.xslDocument.Worksheets;
ImageOrPrintOptions iop = new ImageOrPrintOptions();
iop.OnePagePerSheet = true;
iop.IsCellAutoFit = true;
iop.ImageFormat = System.Drawing.Imaging.ImageFormat.Png;
SheetRender wr = new SheetRender(ws, iop);
the problem is that if big Excel doc is used with many rows or columns the text on the output image is completely unreadable, because image size is too small. (i attached the Excel file i am using and image produced) I can workaround the issue if i explicitly set bigger resolution
iop.HorizontalResolution = 250;
then image is produced of bigger size and text is readible. But i do not know in advance how big is the the Excel file, setting big resolution for a small file will produce image with huge text size.
How can avoid setting explicitely resolution and have satisfactory results for all Excel docs of any size?