Sunday, October 12, 2014

VBA Untuk Melakukan Export Tabel MS Access Ke MS Excel

www.AstroDigi.com AstroDigi.com | Minggu, 12 Okt 2014 | Dalam rangka menyelesaikan tugas kantor, seringkali data yang ada didalam aplikasi MS Access perlu untuk disajikan dalam file berformat MS Excel. Hal ini biasanya dikarenakan MS Excel memang lebih banyak dikenal oleh para pengguna komputer, karena memang tidak dituntut pemahaman pemrograman yang tinggi untuk bisa menggunakan aplikasi MS Excel.


Alasan lain dari pemanfaatan data pada MS Excel adalah apabila diperlukan pengolahan data lagi setelah data tersebut disajikan, misalnya saja data tersebut adalah data mengenai prioritas pembayaran perusahaan kepada para supplier dan biaya untuk memenuhi kebutuhan operasional, biasanya setelah disajikan dalam rapat ada beberapa perubahan angka pembayaran. Nah . . .MS Excel akan mempermudah pengguna komputer yang awam MS Access untuk memanfaatkan data yang ada.

Singkatnya, dengan melakukan export data dari tabel MS Access, pengguna komputer yang paham MS Access dapat berbagi data dengan pengguna komputer yang tidak paham penggunaan aplikasi MS Access, dan hanya menguasai MS Excel, yang memang penggunaannya lebih mudah.

Perintah untuk meng-export tabel dari MS Access ke sheet MS Excel dalam VBA adalah sebagai berikut:

'-----------------------
    DoCmd.TransferSpreadsheet acExport, 8, "nama_tabel", "nama_file_excel.XLS", False, ""
'-----------------------

File MS Excel dengan nama: nama_file_excel.XLS akan otomatis terbentuk di-folder "MyDocuments" anda. Tentunya nama_file_excel.XLS ini boleh anda namakan sesuai kebutuhan anda . . bebas!

Bila setelah perintah export dilakukan kemudian anda ingin langsung melanjutkan dengan membuka file MS Excel penerima data tadi maka bisa dilengkapi dengan perintah untuk menjalankan aplikasi MS Excel dan membuka file, sebagai berikut:

'-----------------------
    DoCmd.TransferSpreadsheet acExport, 8, "nama_tabel", "nama_file_excel.XLS", False, ""
    Call Shell("EXCEL.EXE nama_file_excel.XLS", 1)
'-----------------------------------------

Call Shell(), adalah perintah untuk mengeksekusi file lewat perintah VBA.

Perintah ini juga dapat digunakan untuk mengirimkan data dar QUERY (bukan hanya data dari tabel), jadi perintahnya bisa juga menjadi seperti ini:

'-----------------------
    DoCmd.TransferSpreadsheet acExport, 8, "nama_query", "nama_file_excel.XLS", False, ""
    Call Shell("EXCEL.EXE nama_file_excel.XLS", 1)
'-----------------------------------------

Demikian tips dan tutorial singkat penggunaan VBA untuk meng-export data dari tabel ke sheet MS Excel. Akhir kata semoga artikel ini berguna, selamat mencoba . . have a nice day :-)

 www.AstroDigi.com (Nino Guevara Ruwano)

Comments :

7 comments to “VBA Untuk Melakukan Export Tabel MS Access Ke MS Excel”

6
hollister clothing store
michael kors outlet
michael kors outlet online
coach factory outlet
adidas outlet
michael kors outlet online sale
kate spade outlet
soccer jerseys
marc jacobs handbags
tods outlet
toms shoes
burberry outlet online
thomas sabo
mac cosmetics
michael kors outlet online
ray ban aviator sunglasses
christian louboutin
adidas shoes
lacoste shoes
lululemon
air jordan gamma blue
insanity
ferragamo shoes
true religion outlet
new balance
louis vuitton handbags
ralph lauren outlet
polo ralph lauren
polo ralph lauren outlet
herve leger dresses
fitflop sandals
tiffany and co jewelry
valentino shoes
kobe 9 shoes
celine outlet
puma outlet store
giuseppe zanotti
hollister clothing store
cheap jordans
mcm bags
20150330maoqiuyun

mao yun said...
on 

ninest123 07.31
true religion jeans, oakley sunglasses, louboutin, michael kors outlet, michael kors outlet, coach outlet, longchamp outlet, tiffany jewelry, christian louboutin outlet, michael kors, kate spade outlet, prada handbags, ray ban sunglasses, gucci outlet, tiffany and co, replica watches, michael kors outlet, coach outlet, nike air max, polo ralph lauren outlet, louboutin shoes, ray ban sunglasses, tory burch outlet, michael kors outlet, jordan shoes, nike air max, oakley sunglasses, chanel handbags, coach purses, kate spade handbags, nike free, coach factory outlet, burberry, longchamp outlet, burberry outlet online, nike outlet, prada outlet, oakley sunglasses, polo ralph lauren outlet, longchamp, michael kors outlet, louboutin outlet

ninest123 Ninest said...
on 

true religion outlet, mulberry, lacoste pas cher, true religion jeans, nike air max, new balance pas cher, abercrombie and fitch, lululemon, hermes, nike blazer, longchamp pas cher, air force, vans pas cher, michael kors, nike free run uk, north face, sac guess, nike air max, air jordan pas cher, burberry, converse pas cher, north face, louboutin pas cher, nike air max, nike free, vanessa bruno, ralph lauren pas cher, sac longchamp, michael kors, ralph lauren uk, ray ban uk, air max, hollister, oakley pas cher, michael kors, hogan, tn pas cher, hollister pas cher, ray ban pas cher, nike roshe run, true religion jeans, timberland

ninest123 Ninest said...
on 

wedding dresses, soccer jerseys, nike roshe, abercrombie and fitch, iphone 6 cases, ferragamo shoes, reebok shoes, soccer shoes, ghd, asics running shoes, nike huarache, lululemon, vans shoes, instyler, nike roshe, oakley, insanity workout, p90x workout, mcm handbags, north face outlet, beats by dre, celine handbags, bottega veneta, baseball bats, north face outlet, longchamp, giuseppe zanotti, hollister, valentino shoes, new balance, nfl jerseys, hollister, jimmy choo shoes, babyliss, herve leger, mac cosmetics, birkin bag, timberland boots, chi flat iron, nike trainers, mont blanc, nike air max

ninest123 Ninest said...
on 

swarovski, replica watches, toms shoes, ugg boots, supra shoes, marc jacobs, montre pas cher, links of london, thomas sabo, vans, hollister, ugg pas cher, ugg,ugg australia,ugg italia, nike air max, ray ban, ugg boots uk, ugg boots, ugg,uggs,uggs canada, karen millen, gucci, bottes ugg, lancel, uggs on sale, ralph lauren, hollister, converse, wedding dresses, pandora charms, louboutin, juicy couture outlet, converse outlet, juicy couture outlet, pandora charms, swarovski crystal, ugg boots, coach outlet, pandora jewelry, ugg boots
ninest123 07.31

ninest123 Ninest said...
on 

mac cosmetics,m a c cosmetics,mac makeup,maccosmetics.com,mac cosmetics outlet
louis vuitton outlet,louis vuitton outlet online,louis vuitton,louisvuitton.com,authentic louis vuitton,louis vuitton factory outlet,cheap louis vuitton
fitflop sandals, http://www.fitflop.in.net/
cheap ugg boots, http://www.cheapuggboots.net.co/
ray ban sunglasses, http://www.raybansunglassesonline.in.net/
polo ralph lauren uk, http://www.ralphlauren-outletonline.co.uk/
asics, http://www.asicsisrael.com/
puma sneakers, http://www.pumaoutletonline.com/
lebron 12, http://www.lebronjamesshoes.in.net/
hermes belt for men, http://www.hermesbelts.us/
louis vuitton handbags, http://www.louisvuittonhandbags.org.uk/
michael kors bags, http://www.michaelkorsbags.uk/
kobe bryants shoes 2015, http://www.kobeshoes.us/
michael kors outlet store, http://www.michaelkorsoutletonlinestores.us.com/
supra sneakers, http://www.suprashoes.us.com/
mm0917

mmjiaxin said...
on 

đồng tâm
game mu
cho thuê nhà trọ
cho thuê phòng trọ
nhac san cuc manh
số điện thoại tư vấn pháp luật miễn phí
văn phòng luật
tổng đài tư vấn pháp luật
thành lập công ty trọn gói
http://we-cooking.com/
chém gió
trung tâm tiếng anh

Thấy tình huống tuyết long báo, Tử biết, lúc trước hắn bộc phát chỉ là hồi quang phản chiếu mà thôi. Dù sao trước khi mọi người đến, hắn là một mình đối mặt năm cửu cấp ma thú vây công a! Có thể kiên trì đến bây giờ đã khá lắm rồi.

Diệp Âm Trúc và tử tiến lên, Địch Tư tiến tới. Vợ chồng Minh Huy đứng ở bên người tuyết long báo, đang cố gắng đưa nguyên tố lực của mình vào trong người tuyết long báo. Nhưng nhìn qua hiệu quả cũng không lớn.

-Minh Huy huynh đệ, không cần lãng phí năng lượng của ngươi. Ta đã không được rồi.

Thanh âm tuyết long báo đích có vẻ rất bình tĩnh, thậm chí có chút hưng phấn. Cặp mắt ảm đạm của nó lúc này đang nhìn Tử và Diệp Âm Trúc. Làm cho Diệp Âm Trúc kỳ quái chính là thanh âm của tuyết long báo là thanh âm của nữ.

-Trước khi chết có thể nhìn thấy tử tinh bỉ mông trong truyền thuyết của thú nhân, ta cũng vui mừng lắm rồi. Tử Đế, xin ngài tha thứ cho, ta không thể nào tham bái.

D Entertainment said...
on 

Post a Comment

Related Posts Plugin for WordPress, Blogger...