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

Free Support Forum - aspose.com

Hide borders


How do I hide the border of the cells outside my form in excel sheet. I still want the lines to be visible within my form but outside it i want to hide the lines completely.

Can you advice please?


I think you can use Range.SetOutlineBorders(CellBorderType[] borderStyles, Color[] borderColors) method for your need where CellBorderType enum should be none.

Thank you.

Hi Amjad,

Basically I need to make a form like this. I could not understand how you suggested me to use the borderstyles.

Could you please advice in VB.NET how to make this form?



Hi Shalini,

Thanks for providing us the template file containing your desired form.

May the following sample code help you achieve your desired form, please check it:

Sample code:

'Create a new workbook.
Dim workbook As Workbook = New Workbook()
'Get the first worksheet.
Dim worksheet As Worksheet = workbook.Worksheets(0)
'Set the Gridlines invisible.
worksheet.IsGridlinesVisible = False
Dim cells As Cells = worksheet.Cells
'Merge B1:J4 cells
cells("B1").PutValue("LOOKUP UPLOAD FORM")
cells("B1").Style.Font.Name = "Calibri"
cells("B1").Style.Font.Size = 36
cells("B1").Style.HorizontalAlignment = TextAlignmentType.Center

Dim range As Range = cells.CreateRange("A5","A100")
Dim colstyle As Style = workbook.Styles(workbook.Styles.Add())
colstyle.Borders(BorderType.LeftBorder).LineStyle = CellBorderType.Thin
colstyle.Borders(BorderType.RightBorder).LineStyle = CellBorderType.Thin
colstyle.Borders(BorderType.TopBorder).LineStyle = CellBorderType.Thin
colstyle.Borders(BorderType.BottomBorder).LineStyle = CellBorderType.Thin
Dim flag As StyleFlag = New StyleFlag()
flag.Borders = True

cells("A5").PutValue("Lookup Value")



Note: For inserting picture (your logo), please check the following documentation topic that explains how to embed images into the worksheets:


Hope, it will help you.

Thank you.