Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gridlines in excel through interop

Tags:

excel

interop

Any idea where the setting is hiding for turning gridlines off while using excel 2003 from interop?

like image 613
stimms Avatar asked Jan 30 '09 20:01

stimms


3 Answers

DisplayGridlines is a method on an Excel Window object. For example:

ActiveWindow.DisplayGridlines = true
like image 74
Jon Fournier Avatar answered Oct 20 '22 20:10

Jon Fournier


using Excel = Microsoft.Office.Interop.Excel;
Excel.Application oXL;
oXL.Windows.get_Item(1).DisplayGridlines = false;
like image 27
Kevakapob Avatar answered Oct 20 '22 20:10

Kevakapob


oXL.Windows.Application.ActiveWindow.DisplayGridlines = false;

write the code just before save excel code line.

like image 35
dfds Avatar answered Oct 20 '22 20:10

dfds