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.

Member Avatar for Boyet728

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.