Hi,

Can anyone help me about hiding gridlines in excel sheet using VB.NET.

I need to hide gridlines while exporting to excel from VB.NET.

Thanks.

Hi,

Can anyone help me about hiding gridlines in excel sheet using VB.NET.

I need to hide gridlines while exporting to excel from VB.NET.

Thanks.

Assuming you have created a new excel application and Active.WorkSheet
ex.

Dim oExcel as Object
Dim oSheet as Object

oExcel = New Excel.Application
oSheet = oExcel.ActiveSheet

'make the gridlines disapear
oSheet.DisplayGridLines = False

Yes I tried the same. But it removes the gridlines only from Sheet1, it remains viewable in sheet2 & Sheet3.

Loop through the sheets and do the same for all of them.