比如讀取D:\稅金.xls中sheet1中A1:B20的數(shù)據(jù) dim i as integer application.screenupdating=false for i=1 to 20 activesheet.cells(i,1).formula='D:\[稅金.xls]sheet1'!$A$" & i activesheet.cells(i,2).formula='D:\[稅金.xls]sheet1'!$B$" & i next i activesheet.range("a1").currentregion.copy activesheet.range("a1").PasteSpecial xlPasteValues Application.CutCopyMode = False application.screenupdating=true 運(yùn)行一下后,發(fā)現(xiàn)速度比打開、讀取、關(guān)閉要快多了。特與大家分享。 |
|站長郵箱|小黑屋|手機(jī)版|Office中國/Access中國
( 粵ICP備10043721號(hào)-1 )
GMT+8, 2025-7-13 08:23 , Processed in 0.084614 second(s), 16 queries .
Powered by Discuz! X3.3
© 2001-2017 Comsenz Inc.