@vikashkumarvivek00 wrote:
I have used Vb.net code but facing some issue 'Object strict on disallows late binding ’
Dim xlApp As Microsoft.Office.Interop.Excel.Application
Dim wb As Microsoft.Office.Interop.Excel.Workbook
Dim ws As Microsoft.Office.Interop.Excel.Worksheet
Dim range As Microsoft.Office.Interop.Excel.Range
Dim newXlSheet As Microsoft.Office.Interop.Excel.Worksheet
Try
xlApp=New Microsoft.Office.Interop.Excel.ApplicationClassDim FilePath As String
xlApp.DisplayAlerts=False
FilePath=“C:\Users\Desktop\Projects\Filename.xlsx”
wb=xlApp.Workbooks.Open(FilePath)
xlApp.Visible=True
ws=CType(wb.Sheets(“Template 1”),Microsoft.Office.Interop.Excel.Worksheet)
ws.Copy(Type.Missing,wb.Sheets(wb.Sheets.Count))
wb.Sheets(wb.Sheets.Count).Name= “NEW SHEET”
Catch ex As Exception
system.Windows.MessageBox.show(ex.ToString)
End Try@Dominic Can you please help me out ?
Posts: 2
Participants: 2