Sceneario:
1 - I open a spreadsheet that has two sheets. The first sheet references the second sheet.
2 - Then I update cells in the second sheet
3 - When I go to convert a spreadsheet to an image, the data in the first sheet does not update
How do I get the cell references to update before I do a sheet render?
private static void CreateJpegReport(Worksheet reportWorksheet, string pathToSaveFileAs)
{
ImageOrPrintOptions imgOptions = new ImageOrPrintOptions();
imgOptions.ImageFormat = System.Drawing.Imaging.ImageFormat.Jpeg;
imgOptions.OnePagePerSheet = true;
SheetRender sr = new SheetRender(reportWorksheet, imgOptions);
Bitmap bitmap = sr.ToImage(0);
// Removes trial info
bitmap = ImageUtil.RemoveTopAndBottom(bitmap, 20, 20);
// DONE removing trial info
bitmap = ImageUtil.CropWhitespace(bitmap);
bitmap.Save(pathToSaveFileAs);
}