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

Free Support Forum - aspose.com

Cells grey when xlsx file is opened and saved


when opening and saving the attached xlsx file with Aspose.Cells the cells marked with “X” are grey and will not be printed.

Thanks in advance and best regards,
Stefan Rupp

Hi Stefan,

Thank you for contacting Aspose support.

We have checked your provided sample against latest version of Aspose.Cells for .NET, and we are unable to spot a difference between input and output spreadsheets. We would request you to please give the latest version a try on your end. In case the problem persists, please provide more details of your scenario and a few snapshots to highlight the issue.


Thanks for the template file.

I think you are talking about the range of cells: A39:D52. Well, actually in your Excel file, there is a printable area set “A1:G38” (check PageSetup|Sheet tab), so it will render the page within that range, you may confirm it taking the print preview of the sheet in MS Excel manually.

I think you may either remove the printable area manually in MS Excel before using Aspose.Cells or even using Aspose.Cells to specify the printable area accordingly, see the sample code for your reference:
Sample code:

var workbook = new Workbook(“e:\test2\12174.xlsx”);

// Get the Maximum row which contains data in the sheet
int maxdataRow = workbook.Worksheets[0].Cells.MaxDataRow;
int maxdatacol = workbook.Worksheets[0].Cells.MaxColumn;

workbook.Worksheets[“Übersicht”].PageSetup.PrintArea = “A1:” + CellsHelper.CellIndexToName(maxdataRow + 1, maxdatacol).ToString();

Hope, this helps a bit.

Thank you.


setting the printing area accordingly solved the problem. Thank you for your quick reply and your help!

Best regards,
Stefan Rupp


Good to know that your issue is resolved now. Feel free to contact us any time if you need further help or have some other issue or queries, we will be happy to assist you soon.

Thank you.