Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Imports Excel = Microsoft.Office.Interop.Excel
- Imports Microsoft.Office
- Public Class Form6
- Dim appXL As Excel.Application = Nothing
- Dim wbXL As Excel.Workbook = Nothing
- Dim shXL As Excel.Worksheet = Nothing
- Dim raXL As Excel.Range = Nothing
- Dim i As Integer
- Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
- appXL = New Excel.Application
- wbXL = appXL.Workbooks.Open("D:\fileExcel\Latihan100.xlsx")
- shXL = wbXL.Worksheets("Sheet2")
- shXL.Activate()
- appXL.Visible = True
- For i = 1 To 6
- shXL.Cells(i, 1) = 100
- Next
- End Sub
- End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement