*Excel 関連情報 [#i886b393] **サンプルコード [#d1615f0f] ***ADO を使ってシートを連結する方法 [#za42638b] -複数シート/複数ファイルをマージするサンプル(merge_sheet.vbs) Option Explicit Dim g_strDIR Dim g_strMergeData ' マージ対象のデータフォルダ Dim g_strNewFile ' マージ先のファイル名 Dim g_strNewSheet ' マージ先のシート名 Main ' メイン プロシージャ Sub Main() g_strDIR = "D:\home\edu\hatena\merge_sheet\" ' このマクロがある場所 g_strMergeData = g_strDIR & ".\data" ' マージ対象のデータフォルダ g_strNewFile = g_strDIR & ".\merge.xls" ' マージ先のファイル名 g_strNewSheet = "[Sheet1$]" ' マージ先のシート名 ' 各シートをマージする MergeSheets End Sub ' 各シートをマージする Sub MergeSheets() Dim cn Dim rs Set cn = CreateObject("ADODB.Connection") cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & g_strNewFile & ";Extended Properties=Excel 8.0" Dim fs Set fs = CreateObject("Scripting.FileSystemObject") Dim folder Set folder = fs.GetFolder(g_strMergeData) Dim file Dim sheet Dim sheets() ' ファイルの数だけ処理を行う For Each file In folder.Files GetSheetNames file, sheets ' ファイル内の各シートを新しいシートに挿入する For Each sheet In sheets Dim strSQL strSQL = "INSERT INTO " & g_strNewSheet & " SELECT * FROM " & sheet ' INSERT 文を実行 cn.Execute strSQL Next Next End Sub ' 指定したファイルのシート名(複数シート名)を取得する Function GetSheetNames(ByVal file, ByRef sheets()) Dim app Set app = CreateObject("Excel.Application") app.Workbooks.Open file Dim i Dim nSheets nSheets = app.Worksheets.Count ReDim sheets(nSheets - 1) For i = 0 To nSheets - 1 ' "シート名"+"$" を配列に格納 sheets(i) = "[Excel 8.0;database=" & file & "].[" & app.Worksheets(i + 1).Name & "$]" Next app.Workbooks.Close Set app = Nothing End Function -ダウンロード #ref(merge_sheet.zip); ■ フォルダ構成 D:\HOME\EDU\HATENA\MERGE_SHEET │ macro.vbs … XLSマージスクリプト(VBScriptバージョン) │ macro.xls … XLSマージスクリプト(Excel/VBAバージョン) │ merge.xls … マージ先のファイル │ readme.txt … このファイル │ └─data … マージ対象ファイル aaa.xls bbb.xls ccc.xls -制限事項 --マージ対象の Excel ファイルは、すべてのシートにデータが入っている必要があります。 --空のシートがあるとエラーになります。ご注意下さい。 -はてな --http://www.hatena.ne.jp/1088413798 ---終わってしまったけど。 -Thanks for the good site. [URL=http://tiffanys.schadez.info]tiffanys[/URL] tiffanys [URL=http://venus-swimwear.zeiter.info]venus swimwear[/URL] venus swimwear <a href="http://weightwatchers.schadez.info">weightwatchers</a> weightwatchers <a href="http://annualcreditreport.zeiter.info">annualcreditreport</a> annualcreditreport <a href="http://citimortgage.zeiter.info">citimortgage</a> citimortgage http://orlando-sentinal.schadez.info orlando sentinal http://gieco.zeiter.info gieco http://peapod.zeiter.info peapod http://thrifty-nickel.zeiter.info thrifty nickel http://bamboozle.zeiter.info bamboozle -- [[tiffanys]] &new{2008-11-19 (水) 14:48:58}; -Hello, you did a great work on your site <a href="http://eva-mendez-pussy.bamygy.net/">eva-mendez-pussy site</a> info <a href="http://tube-scat-sex.bamygy.net/">tube-scat-sex info</a> about <a href="http://free-ilovethebeach.bamygy.net/">free-ilovethebeach info</a> info <a href="http://arpasuyu-porno.bamygy.net/">arpasuyu-porno about</a> blog <a href="http://lesbian-shit-tube.bamygy.net/">lesbian-shit-tube info</a> online <a href="http://free-purn-sites.bamygy.net/">free-purn-sites info</a> info <a href="http://free-poren-home.bamygy.net/">free-poren-home info</a> blog <a href="http://preeteens-on-beach.bamygy.net/">preeteens-on-beach blog</a> about <a href="http://welcome-gyno-clinic.bamygy.net/">welcome-gyno-clinic info</a> info <a href="http://tube1-video.bamygy.net/">tube1-video info</a> online -- [[eva-mendez-pussy info]] &new{2008-11-21 (金) 00:47:47}; -User friendly site with quality content. <a href="http://welcome-gyno-clinic.cuqaku.com/">welcome-gyno-clinic info</a> online <a href="http://preeteens-on-beach.cuqaku.com/">preeteens-on-beach</a> info <a href="http://arpasuyu-porno.cuqaku.com/">arpasuyu-porno</a> blog <a href="http://tube1-video.cuqaku.com/">tube1-video</a> site <a href="http://lesbian-shit-tube.cuqaku.com/">lesbian-shit-tube site</a> info <a href="http://free-poren-home.cuqaku.com/">free-poren-home info</a> online <a href="http://tube-scat-sex.cuqaku.com/">tube-scat-sex site</a> about <a href="http://free-ilovethebeach.cuqaku.com/">free-ilovethebeach blog</a> site <a href="http://eva-mendez-pussy.cuqaku.com/">eva-mendez-pussy about</a> blog <a href="http://free-purn-sites.cuqaku.com/">free-purn-sites site</a> info -- [[lesbian-shit-tube site]] &new{2008-11-21 (金) 00:56:09}; -User friendly site with quality content. <a href="http://welcome-gyno-clinic.cuqaku.com/">welcome-gyno-clinic info</a> online <a href="http://preeteens-on-beach.cuqaku.com/">preeteens-on-beach</a> info <a href="http://arpasuyu-porno.cuqaku.com/">arpasuyu-porno</a> blog <a href="http://tube1-video.cuqaku.com/">tube1-video</a> site <a href="http://lesbian-shit-tube.cuqaku.com/">lesbian-shit-tube site</a> info <a href="http://free-poren-home.cuqaku.com/">free-poren-home info</a> online <a href="http://tube-scat-sex.cuqaku.com/">tube-scat-sex site</a> about <a href="http://free-ilovethebeach.cuqaku.com/">free-ilovethebeach blog</a> site <a href="http://eva-mendez-pussy.cuqaku.com/">eva-mendez-pussy about</a> blog <a href="http://free-purn-sites.cuqaku.com/">free-purn-sites site</a> info -- [[lesbian-shit-tube site]] &new{2008-11-21 (金) 00:56:47}; -User friendly site with quality content. <a href="http://porngonzo-movies.giqesu.net/">porngonzo-movies about</a> online <a href="http://sex-met-katara.giqesu.net/">sex-met-katara info</a> site <a href="http://only-lesbions.giqesu.net/">only-lesbions site</a> blog <a href="http://cekc-photo.giqesu.net/">cekc-photo about</a> info <a href="http://sixysamira-de.giqesu.net/">sixysamira-de info</a> blog <a href="http://nextdoorbuddy.giqesu.net/">nextdoorbuddy blog</a> about <a href="http://tube-live-mature.giqesu.net/">tube-live-mature about</a> site <a href="http://bbw-tales.giqesu.net/">bbw-tales blog</a> online <a href="http://www-seks-tv.giqesu.net/">www-seks-tv</a> about <a href="http://orgyental-tube.giqesu.net/">orgyental-tube</a> site -- [[bbw-tales site]] &new{2008-11-21 (金) 05:25:50}; -User friendly site with quality content. <a href="http://voyeurmax-com.hubasi.net/">voyeurmax-com blog</a> about <a href="http://hosted-by-ync-com.hubasi.net/">hosted-by-ync-com site</a> info <a href="http://baylee-nude.hubasi.net/">baylee-nude info</a> site <a href="http://www-blackbooty-com.hubasi.net/">www-blackbooty-com site</a> site <a href="http://mom-and-boy-tube.hubasi.net/">mom-and-boy-tube</a> online <a href="http://elitexxxpass-com.hubasi.net/">elitexxxpass-com blog</a> online <a href="http://www-vedeosz-com.hubasi.net/">www-vedeosz-com blog</a> online <a href="http://sexe-grany.hubasi.net/">sexe-grany site</a> blog <a href="http://zooo-porno-com.hubasi.net/">zooo-porno-com blog</a> blog <a href="http://heeljob-transsexual.hubasi.net/">heeljob-transsexual site</a> about -- [[sexe-grany blog]] &new{2008-11-21 (金) 09:21:07}; -Thank you for the good work. <a href="http://www-bangross-com.hyjima.net/">www-bangross-com site</a> online <a href="http://www-frenchgirls.hyjima.net/">www-frenchgirls blog</a> online <a href="http://niurka-nude-tube.hyjima.net/">niurka-nude-tube site</a> about <a href="http://rika-nishimura-nude.hyjima.net/">rika-nishimura-nude site</a> site <a href="http://shemal.hyjima.net/">shemal blog</a> site <a href="http://stilproject.hyjima.net/">stilproject about</a> online <a href="http://tram-pararam.hyjima.net/">tram-pararam info</a> blog <a href="http://shota-con-porno.hyjima.net/">shota-con-porno site</a> about <a href="http://wwwcam-com.hyjima.net/">wwwcam-com info</a> info <a href="http://qmov-free-passwords.hyjima.net/">qmov-free-passwords</a> about -- [[tram-pararam info]] &new{2008-11-21 (金) 09:27:27}; -Hello, you did a great work on your site <a href="http://naketgrils.jelofa.net/">naketgrils blog</a> blog <a href="http://pink-default-layout.jelofa.net/">pink-default-layout</a> site <a href="http://69-89-of-sex.jelofa.net/">69-89-of-sex about</a> about <a href="http://jana-defi-xnxxx.jelofa.net/">jana-defi-xnxxx</a> site <a href="http://tayvan-porn.jelofa.net/">tayvan-porn site</a> online <a href="http://free-fuckpic.jelofa.net/">free-fuckpic about</a> online <a href="http://so-tangas-com.jelofa.net/">so-tangas-com info</a> info <a href="http://www-arab-sex-tv.jelofa.net/">www-arab-sex-tv info</a> info <a href="http://www-sixlive.jelofa.net/">www-sixlive info</a> info <a href="http://mandy-ineed2pee.jelofa.net/">mandy-ineed2pee about</a> blog -- [[69-89-of-sex blog]] &new{2008-11-22 (土) 10:58:15}; -excellent site. <a href="http://xemphimsex.kikizu.com/">xemphimsex info</a> about <a href="http://saxyfilm.kikizu.com/">saxyfilm info</a> info <a href="http://3arab-sex.kikizu.com/">3arab-sex info</a> site <a href="http://dog-tube-365.kikizu.com/">dog-tube-365</a> blog <a href="http://dixie-cuties-lineup.kikizu.com/">dixie-cuties-lineup blog</a> online <a href="http://ben-10-drawn-sex.kikizu.com/">ben-10-drawn-sex blog</a> online <a href="http://sri-lanka-xxx.kikizu.com/">sri-lanka-xxx site</a> site <a href="http://pornube-t.kikizu.com/">pornube-t</a> info <a href="http://aljezira-net.kikizu.com/">aljezira-net site</a> about <a href="http://y3df-passwords.kikizu.com/">y3df-passwords</a> site -- [[y3df-passwords info]] &new{2008-11-22 (土) 21:38:58}; -Your site is very interesting and useful <a href="http://red-tube-sex-tv.kypehi.com/">red-tube-sex-tv site</a> about <a href="http://passionuk-passwords.kypehi.com/">passionuk-passwords</a> info <a href="http://shannan-leigh-video.kypehi.com/">shannan-leigh-video</a> info <a href="http://eskimo-porno.kypehi.com/">eskimo-porno info</a> blog <a href="http://www-indian365-com.kypehi.com/">www-indian365-com about</a> info <a href="http://pedosex-galleries.kypehi.com/">pedosex-galleries site</a> site <a href="http://video-femme-zoofile.kypehi.com/">video-femme-zoofile blog</a> blog <a href="http://watch-sexysat.kypehi.com/">watch-sexysat blog</a> blog <a href="http://ass2mouthqueens.kypehi.com/">ass2mouthqueens</a> online <a href="http://animal-pourn.kypehi.com/">animal-pourn site</a> blog -- [[www-indian365-com info]] &new{2008-11-22 (土) 21:39:04}; -Hi. Great website. <a href="http://rawtube-password.lyroga.com/">rawtube-password site</a> info <a href="http://gaywix-vidio.lyroga.com/">gaywix-vidio info</a> info <a href="http://bugati-com.lyroga.com/">bugati-com info</a> info <a href="http://3rab-porn.lyroga.com/">3rab-porn blog</a> online <a href="http://www-porno-at.lyroga.com/">www-porno-at info</a> site <a href="http://video-velba.lyroga.com/">video-velba info</a> about <a href="http://porno-kides.lyroga.com/">porno-kides blog</a> info <a href="http://pornhub-cpm.lyroga.com/">pornhub-cpm blog</a> blog <a href="http://sex-black-mom-com.lyroga.com/">sex-black-mom-com about</a> online <a href="http://pornbizzard.lyroga.com/">pornbizzard site</a> about -- [[3rab-porn]] &new{2008-11-23 (日) 01:47:05}; -Hi. Great website. <a href="http://myspeca.munofa.net/">myspeca blog</a> info <a href="http://big-and-old-sxey.munofa.net/">big-and-old-sxey site</a> online <a href="http://you.munofa.net/">you</a> online <a href="http://porn-coprofilia.munofa.net/">porn-coprofilia info</a> info <a href="http://sex-sex-hot-bangla.munofa.net/">sex-sex-hot-bangla site</a> about <a href="http://wwwgirls.munofa.net/">wwwgirls</a> site <a href="http://keez-sex-porn.munofa.net/">keez-sex-porn</a> online <a href="http://zuleidy.munofa.net/">zuleidy info</a> online <a href="http://www-chichonas-com.munofa.net/">www-chichonas-com</a> info <a href="http://www-sexy4u-ca.munofa.net/">www-sexy4u-ca about</a> online -- [[you info]] &new{2008-11-24 (月) 08:46:18}; -Keep up this great resource. best greetings. <a href="http://megumi-hentai.pozovo.com/">megumi-hentai info</a> online <a href="http://tubehenati-net.pozovo.com/">tubehenati-net info</a> info <a href="http://myanmarvedio.pozovo.com/">myanmarvedio about</a> about <a href="http://fotoplenka-ru.pozovo.com/">fotoplenka-ru info</a> blog <a href="http://fuckingmidgets-com.pozovo.com/">fuckingmidgets-com blog</a> about <a href="http://ea-tvto.pozovo.com/">ea-tvto about</a> online <a href="http://yungpussy.pozovo.com/">yungpussy</a> online <a href="http://you-porne-tube.pozovo.com/">you-porne-tube</a> online <a href="http://www-xxxdessert-net.pozovo.com/">www-xxxdessert-net site</a> info <a href="http://pornoxxx-ru.pozovo.com/">pornoxxx-ru info</a> online -- [[myanmarvedio about]] &new{2008-11-24 (月) 20:28:17}; -User friendly site with quality content. <a href="http://bikinidare.poquly.net/">bikinidare blog</a> about <a href="http://porn-hatai.poquly.net/">porn-hatai site</a> blog <a href="http://chennaisex.poquly.net/">chennaisex blog</a> site <a href="http://doujin-katara.poquly.net/">doujin-katara info</a> about <a href="http://all-over-30.poquly.net/">all-over-30</a> site <a href="http://www-kbs-kr-com.poquly.net/">www-kbs-kr-com</a> info <a href="http://tube-pornp-gratis.poquly.net/">tube-pornp-gratis blog</a> online <a href="http://hidjab-sex.poquly.net/">hidjab-sex blog</a> site <a href="http://www-spermnow-com.poquly.net/">www-spermnow-com blog</a> online <a href="http://www-vuon-mong-mo.poquly.net/">www-vuon-mong-mo blog</a> site -- [[doujin-katara blog]] &new{2008-11-24 (月) 20:29:04}; -This is a very informative site <a href="http://hotblackvids.tazuqy.com/">hotblackvids blog</a> about <a href="http://private-sex-tube.tazuqy.com/">private-sex-tube</a> info <a href="http://strap-ondreamer.tazuqy.com/">strap-ondreamer blog</a> site <a href="http://aflam-porno-video.tazuqy.com/">aflam-porno-video info</a> site <a href="http://granies-tube.tazuqy.com/">granies-tube info</a> about <a href="http://johnny-test-xxx.tazuqy.com/">johnny-test-xxx site</a> blog <a href="http://needle-torcher.tazuqy.com/">needle-torcher</a> online <a href="http://big-vulva-photos.tazuqy.com/">big-vulva-photos</a> info <a href="http://free-urdu-movies.tazuqy.com/">free-urdu-movies site</a> online <a href="http://purenudism-pictures.tazuqy.com/">purenudism-pictures blog</a> info -- [[johnny-test-xxx info]] &new{2008-11-25 (火) 00:37:15}; -Thanks for the good site. <a href="http://index9.tyrero.com/">about-westindiessex</a> online <a href="http://index5.tyrero.com/">hentail-ben-10</a> site <a href="http://index1.tyrero.com/">lanka-sexclips</a> about <a href="http://index10.tyrero.com/">you-tube-com-somali</a> blog <a href="http://index4.tyrero.com/">nibblez-porn</a> info <a href="http://index3.tyrero.com/">lola-animal-sex</a> about <a href="http://index2.tyrero.com/">www-yuotube-com</a> site <a href="http://index7.tyrero.com/">voayer-sex-mature</a> blog <a href="http://index8.tyrero.com/">www-visa4uk-com</a> blog <a href="http://index6.tyrero.com/">seks-hot-tube</a> info -- [[Lorraine]] &new{2008-11-25 (火) 07:00:15}; -excellent site. <a href="http://index4.wefozi.net/">s-e-x-v-tv</a> site <a href="http://index5.wefozi.net/">bald-teenies</a> site <a href="http://index1.wefozi.net/">zoofile-online-ru</a> blog <a href="http://index2.wefozi.net/">sex-tube-niurka</a> online <a href="http://index3.wefozi.net/">free-zoofilia-filme</a> about -- [[suzan]] &new{2008-11-25 (火) 07:37:37}; -Hi. Great website. <a href="http://index1.werezo.com/">smuss-com-pamela</a> online <a href="http://index2.werezo.com/">fat-women-vedio-sex</a> about <a href="http://index4.werezo.com/">www-bamgbros</a> blog <a href="http://index3.werezo.com/">you-porn-margarita</a> about <a href="http://index5.werezo.com/">porn-tube-vedio</a> site -- [[blog]] &new{2008-11-25 (火) 11:22:55}; -Keep up this great resource. best greetings. <a href="http://index9.wixitu.com/">brazzers-sex-tube</a> online <a href="http://index6.wixitu.com/">dinoaur-layouts</a> blog <a href="http://index10.wixitu.com/">artis-india-bugil</a> info <a href="http://index2.wixitu.com/">katie-price-tube</a> online <a href="http://index7.wixitu.com/">red-tube-indian-sex</a> online <a href="http://index3.wixitu.com/">gills-and-boy-games</a> blog <a href="http://index1.wixitu.com/">utube-com-video</a> online <a href="http://index4.wixitu.com/">www-yuotube-com-my</a> online <a href="http://index8.wixitu.com/">porno-dominicano</a> blog <a href="http://index5.wixitu.com/">hamster-just-porn</a> about -- [[forum]] &new{2008-11-25 (火) 11:57:09}; -Very nice resource - thank you. <a href="http://index3.zopysu.com/">girl-com-mk</a> site <a href="http://index1.zopysu.com/">kink-com</a> online <a href="http://index2.zopysu.com/">search-pley-boy</a> about <a href="http://index4.zopysu.com/">www-sple-nl</a> online <a href="http://index5.zopysu.com/">www-hot-bebes-com</a> online -- [[John]] &new{2008-11-25 (火) 19:40:40}; -good work, keep it up <a href="http://pornr.dabyte.net/">pornr site</a> about <a href="http://wwww-farfesh-com.dabyte.net/">wwww-farfesh-com</a> about <a href="http://www-198-com.dabyte.net/">www-198-com about</a> site <a href="http://tube-gyno.dabyte.net/">tube-gyno about</a> info <a href="http://nudisum.dabyte.net/">nudisum blog</a> site <a href="http://foxsex-com.dabyte.net/">foxsex-com blog</a> about <a href="http://porno-china.dabyte.net/">porno-china info</a> about <a href="http://saxy-clips.dabyte.net/">saxy-clips</a> info <a href="http://freexcafe-com.dabyte.net/">freexcafe-com site</a> blog <a href="http://www-mlnlcllp-com.dabyte.net/">www-mlnlcllp-com info</a> blog -- [[www-198-com info]] &new{2008-11-26 (水) 07:59:51}; -User friendly site with quality content. <a href="http://videos-zoofever.dedopy.com/">videos-zoofever</a> about <a href="http://only-carla-torrent.dedopy.com/">only-carla-torrent about</a> about <a href="http://jovensita-porno.dedopy.com/">jovensita-porno info</a> about <a href="http://password-nayarablue.dedopy.com/">password-nayarablue site</a> blog <a href="http://videos-666-com.dedopy.com/">videos-666-com</a> site <a href="http://sextub-dog.dedopy.com/">sextub-dog about</a> about <a href="http://rettub.dedopy.com/">rettub info</a> about <a href="http://shesashemale-com.dedopy.com/">shesashemale-com blog</a> site <a href="http://ifeelmyself-couple.dedopy.com/">ifeelmyself-couple info</a> site <a href="http://dierensex-dk.dedopy.com/">dierensex-dk</a> info -- [[videos-zoofever site]] &new{2008-11-26 (水) 09:33:44}; #comment