Mungkin artikel disini bisa membantu http://coding4ever.wordpress.com/2009/12/30/membuat-laporan-dalam-format-ms-excel/
--- In [email protected], astawan <astawan...@...> wrote: > > winda tania wrote: > > > > > > Ass... > > Gimana caranya bikin laporan ga pake crystal report tapi di export ke > > excel? > > Wass... > > > > weh.. ini gampang banget, report ke excel lebih bisa kita modifikasi > saat runtime dari pada CR, tapi lebih lambat dan harus terinstall Ms. Excel. > langkah-langkah : > 1. masukan library excel ke project dari menu Project -> references, > lalu pilih *Microsoft Excel xx Object Library.* > 2. buka excel, buat workbook baru, lalu simpan dengan format excel > (.xls) biasa atau template (.xlt). > 3. contoh coding : > ' deklarasi variabel > Dim xl As Excel.Application > ' membuat objek > Set xl = CreateObject("excel.application") > ' membuka file excel > xl.Workbooks.Add "c:\test.xlt" > ' memasukan data ke excel pada baris 1 kolom 1 > xl.Cells(1, 1) = "Test Report Excel" > ' menampilkan file yang dibuka > xl.Visible = True > Set xl = Nothing > > anda bisa memanfaatkan macro untuk memodifikasi excel dari vb. >
