Currently I'm using the spire xls version 11.6.0.5040 and facing a problem when converting an excel file..
Below is the code that I'm using to convert the excel:
- Code: Select all
using (MemoryStream ms = new MemoryStream())
{
sheet.ToEMFStream(ms, sheet.FirstRow, sheet.FirstColumn, sheet.LastRow, sheet.LastColumn);
Image image = Image.FromStream(ms);
Bitmap images = ResetResolutionExcel(image as Metafile, res);
images.Save(pngTarget, ImageFormat.Png);
}
When converting the excel file, the line ToEMFStream hit the error StackOverflowException and immediately break my programme.
Here I attached the sample file for you to test out.