VB Lesson: Excel Application


Cara menyimpan data ke dalam file Excel. Biasanya berguna untuk membuat data logging.

Video.

VB Source Code


14 responses to “VB Lesson: Excel Application”

  1. salam,
    haa..nie la tutorial yang dicari..tapi mcm mne plak untuk guna database sebagai file import..maksud nye same mcm excel tapi guna database..

    harap dapat membantu..kerana saya ingin menggunakannya untuk project tahun akhir sy terima kasih..
    =)

  2. salam,

    owh ok..kalo saya nak mintak tolong dari kamu bleh tak? sya sebenarnya pelajar tahun 4 dan dalam prosess untuk buat projek tahun akhir. sya hadapi masalh untuk keluarkan data dari excel ke visual basic. boleh tak kamu tolong sy?

  3. salam..saya ada masalah dengan VB…masalah yang kuar ialah procedure declaration does not match description of events or procedure having the same name..kenapa jadi mcm tu ye…saya tak tahu silap kt mna..sy dah cuba betulkan tp still error lg…boleh tak tolong saya

  4. Salam. yg ini VB 2010 to Excel 2013 ke? Sebab saya dah follow every steps and dapat error ni

    “Excel.Applications is not defined”
    “Excel.Workbook is not defined”
    .
    .
    .

  5. salam saya ada buat untuk export data dari listview ke excel. tapi nak tambah colum header saya tak dapat cari harap abg boleh ubah suai kod sy ni…

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
    Try
    Me.Cursor = Cursors.WaitCursor
    Dim ExcelApp As Object, ExcelBook As Object
    Dim ExcelSheet As Object
    Dim i As Integer
    Dim j As Integer
    ‘create object of excel
    ExcelApp = CreateObject(“Excel.Application”)
    ExcelBook = ExcelApp.WorkBooks.Add
    ExcelSheet = ExcelBook.WorkSheets(1)
    With ExcelSheet
    ExcelSheet.Cells(7, 2) = “Name”
    For i = 1 To Me.lstview.Items.Count
    .cells(i, 1) = Me.lstview.Items(i – 1).Text
    For j = 1 To lstview.Columns.Count – 1
    .cells(i, j + 1) = Me.lstview.Items(i – 1).SubItems(j).Text
    Next
    Next
    End With
    ExcelApp.Visible = True
    ExcelSheet = Nothing
    ExcelBook = Nothing
    ExcelApp = Nothing
    Me.Cursor = Cursors.Default
    Catch ex As Exception
    Me.Cursor = Cursors.Default
    MessageBox.Show(ex.Message, “Message”, MessageBoxButtons.OK, MessageBoxIcon.Information)
    End Try
    End Sub
    End Class

  6. Salam dan hye, saya nak tanya mengenai Microsoft Visual Basic 6.0 . Selalunya sya buat interface guna vb 6.0 dan Microsoft Excess sbg database tapi, sekarang saya diberi tugasan utk buat sistem yg mana databasenya kena guna Excell . Jadi, sya nak tahu sama ada encik tahu tak nak link kan interface vb 6.0 dengan excel ? if tahu . harap dapat email saya secepat mungkin. huhu sgt2 buntu . dah cuba macam2 x jd ๐Ÿ™

    this is my email : ila93syakila@gmail.com / ilasyakila93@yahoo.com

    Thank you ๐Ÿ™‚

Leave a Reply to Ila Cancel reply

Your email address will not be published. Required fields are marked *