Hello Sadiq,
I am not quite sure of the Point 1; however you can get some hint for the point #2 from the code mentioned below:
Try
Dim excelApp As New Microsoft.Office.Interop.Excel.Application
If (Not File.Exists(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "TestApp.xlsx"))) Then
File.Create(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "TestApp.xlsx"))
End If
Dim excelBook As Workbook = excelApp.Workbooks.Open(AppDomain.CurrentDomain.BaseDirectory & "TestApp.xlsx")
With excelBook
Dim sheet As Worksheet = excelBook.ActiveSheet
sheet.Range("A1", "D4").BorderAround(, XlBorderWeight.xlThick, XlColorIndex.xlColorIndexAutomatic)
End With
excelBook.Save()
Catch ex As Exception
MessageBox.Show("Exception occurred : " & Environment.NewLine & ex.Message)
End Try
Please let me know with details of what you need about point #1.