- ©«¤l
- 4
- ¥DÃD
- 2
- ºëµØ
- 0
- ¿n¤À
- 6
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows7
- ³nÅ骩¥»
- OFFICE2010
- ¾\ŪÅv
- 10
- ©Ê§O
- ¤k
- µù¥U®É¶¡
- 2012-12-21
- ³Ì«áµn¿ý
- 2012-12-25
|
¤Ó·PÁ¤F¡A¯uªº¥i¥H¤FC¡I
¥i¬O§Ú¥[¤Fwhere ¥H«á¤S¤£¦æ¤F¡C¥Dn¬O·Q±Nitm_no³oÓÄæ¦ì¤£¬°ªÅªº¤~copy¨ìCells(1, 1).
·|¥X²{ error "°Ñ¼Æ¤Ó¤Ö¡A¹w´ÁÓ¼Æ1"
Sub get_data_with_sql()
Set rs = CreateObject("adodb.recordset")
rs.Open "select * from [¤j¤j1217¼ÐÅÒ$L2:V39] where itm_no is not null", "Driver={Microsoft Excel Driver (*.xls)};dbq=C:\Users\dsc\Documents\¤j¤j°ª¤¤1217.xls"
Cells(1, 1).CopyFromRecordset (rs)
End Sub |
|