We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

GridLines Not Showing in Image

I have a speadsheet that when converted to an image displays boxes in an area that should contain empty rows and columns. The upper part contains text and displays correctly, but then random areas on the lower part contains just boxes. I have attached the dummy spreadsheet showing the problem, a PDF produces by printing from Excel, and a PDF printed from my application that shows the image produced. The setting that I am using are:

msExcelImageOrPrintOptions = new ImageOrPrintOptions();

msExcelImageOrPrintOptions.ImageFormat = ImageFormat.Bmp;

msExcelImageOrPrintOptions.PrintingPage = PrintingPageType.IgnoreBlank;

msExcelImageOrPrintOptions.HorizontalResolution = 300;

msExcelImageOrPrintOptions.VerticalResolution = 300;

and the code to produce the images is:

msExcelWorkbook.Worksheets[i].PageSetup.PaperSize = PaperSizeType.Paper9x11;

msExcelWorkbook.Worksheets[i].PageSetup.PrintGridlines = true;

SheetRender sheetRender = new SheetRender(msExcelWorkbook.Worksheets[pageEntry.WorkSheetIndex], msExcelImageOrPrintOptions);

Bitmap bitmap = sheetRender.ToImage(pageEntry.WorkSheetPageIndex);

The attached zip file contains the PDF and XLS file.

I have tried a number of different settings, but the results stay the same.

Thank you,

Jeff

Hi Jeff,


Thanks for the template files.

Please download and try our latest version/fix: Aspose.Cells for .NET v 7.1.1.1

I have tested to convert your file to PDF it works fine as it should same as MS Excel.

Thank you.