NativeExcel for .Net Developer's Reference

IPageSetup.PrintGridLines Property

Gets or sets a value that indicates whether the cell gridlines are printed on the page.

[Visual Basic]
PropertyPrintGridLinesAsBoolean
[C#]
boolPrintGridLines{get;set;}
[C++]
__propertyboolget_PrintGridLines();
__propertyvoidset_PrintGridLines(bool);
[JScript]
functiongetPrintGridLines():bool
functionsetPrintGridLines(bool);

Property Value

True if cell gridlines are printed on the page.

Example

This example prints cell gridlines when sheet one is printed.

[C#]
book.Worksheets[1].PageSetup.PrintGridLines = true;
[VisualBasic]
book.Worksheets(1).PageSetup.PrintGridLines = True
[C++]
book->Worksheets->Item[1]->PageSetup->PrintGridLines = true;

See Also

IPageSetup Interface | NativeExcel Namespace | PageSetup Property