¨DQueryTables n¦p¦ó滙¤J¨ä¥Lªº excel ÀÉ®×
- ©«¤l
- 29
- ¥DÃD
- 8
- ºëµØ
- 0
- ¿n¤À
- 58
- ÂI¦W
- 0
- §@·~¨t²Î
- WinXP
- ³nÅ骩¥»
- office2003
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2015-3-2
- ³Ì«áµn¿ý
- 2015-6-1
|
¨DQueryTables n¦p¦ó滙¤J¨ä¥Lªº excel ÀÉ®×
³o¬O¿ý¸m¥¨¶°©Ò²£¥Íªºµ{¦¡½X, ¦ý¤£¤F¸Ñ³oÓ»yªk, ¦³°ª¤â¥i¥H¸Ñµª¶Ü
³oÓ¥¨¶°¥i¥H¦A²¤Æ¶Ü
With ActiveSheet.QueryTables.Add(Connection:=Array( _
"OLEDB;Provider=Microsoft.Jet.OLEDB.4.0;Password="""";User ID=Admin;Data Source=I:\VBA.xls;Mode=Share Deny Write;Extended Prop" _
, _
"erties=""HDR=YES;"";Jet OLEDB:System database="""";Jet OLEDB:Registry Path="""";Jet OLEDB:Database Password="""";Jet OLEDB:Engine Type=3" _
, _
"5;Jet OLEDB:Database Locking Mode=0;Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Global Bulk Transactions=1;Jet OLEDB:New Datab" _
, _
"ase Password="""";Jet OLEDB:Create System Database=False;Jet OLEDB:Encrypt Database=False;Jet OLEDB:Don't Copy Locale on Compact=F" _
, "alse;Jet OLEDB:Compact Without Replica Repair=False;Jet OLEDB:SFP=False"), _
Destination:=Range("A2"))
.CommandType = xlCmdTable
.CommandText = Array("Status$")
.Name = "VBA_1"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.PreserveColumnInfo = True
.SourceDataFile = "I:\VBA.xls"
.Refresh BackgroundQuery:=False
End With |
|
|
|
|
|
|