Mengolah Excel data dengan Visual Basic
barsa — Sat, 04/18/2009 - 20:04
Mengolah data excel melalui visual basic tidaklah terlalu sulit. Berikut ini di sajikan salah satu contohnya.
Imports Excel = Microsoft.Office.Interop.Excel Public Sub New() ' This call is required by the Windows Form Designer. InitializeComponent() System.Threading.Thread.CurrentThread.CurrentCulture = _ Dim oXL As Excel.Application Dim misValue As Object = System.Reflection.Missing.Value oXL = New Excel.ApplicationClass oXL.Visible = True End Sub
System.Globalization.CultureInfo.CreateSpecificCulture("en-US")
Dim oWB As Excel.Workbook
Dim oSheet As Excel.Worksheet
Dim oRng As Excel.Range
oWB = oXL.Workbooks.Add(misValue)
oSheet = oWB.Sheets(2) ' or ("sheet1")
oSheet.Range("A1:A2").Value = "http://vb.net-informations.com"


