ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[³]¤@­Ó¥¨¶°] ¶}±ÒÀÉ®× °ÝÃD....

[³]¤@­Ó¥¨¶°] ¶}±ÒÀÉ®× °ÝÃD....

C:\auto_download_page\chap42589_00001_2013_0830_1457"   =====> file size 70kb
C:\auto_download_page\chap42589_00002_2013_0830_1458"   =====> file size 70kb
C:\auto_download_page\chap42589_00003_2013_0830_1459"   =====> file size 70kb
C:\auto_download_page\chap42589_00004_2013_0830_1500"   =====> file size 70kb
C:\auto_download_page\chap42589_00005_2013_0830_1501"   =====> file size 70kb
C:\auto_download_page\chap42589_00006_2013_0830_1502"   =====> file size 230kb
C:\auto_download_page\chap42589_00007_2013_0830_1503"   =====> file size 230kb
C:\auto_download_page\chap42589_00008_2013_0830_1504"   =====> file size 230kb

½Ð°Ý¦pªG§Ú­n³]¤@­Ó¥¨¶° ©w®É¶}±ÒÀÉ®×
¦pªG file size ¬O100kb ¥H¤U ´N¤£¶}±Ò ( ´`Àô N ¦¸ )  ( ¨Ã¦³¦¸§Ç file¦W 00001 , 00002 .............. ´ú¸Õ¶}±ÒÀÉ®× )
ª½¨ìÀÉ®× 00006 ªº size ¶W¹L 100kb ¤~¶}±ÒÀÉ®×, macro À³¸Ó«ç¼g ???

¦^´_ 1# jakcy1234
¸Õ¸Õ¬Ý
  1. Option Explicit
  2. Sub Ex()
  3.     Dim fs As Object, File_Nane As String
  4.     Set fs = CreateObject("Scripting.FileSystemObject")
  5.     File_Nane = Dir("C:\*.xls")   '·j´M¸ê®Æ§¨¸Ìªº°ÆÀɦW
  6.     Do While File_Nane <> ""
  7.         Set fs = CreateObject("Scripting.FileSystemObject").GetFILE(File_Nane)
  8.         If UBound(Split(File_Nane, "_")) > 0 Then                              'ÀɮצWºÙ¤¤¦³ "???_???_"
  9.             If Val(Split(File_Nane, "_")(1)) >= 6 And fs.Size / 1024 > 100 Then
  10.                 Workbooks.Open (fs)
  11.             End If
  12.         End If
  13.         File_Nane = Dir         '·j´M¸ê®Æ§¨¸Ì¤U¤@­Ó¬Û¦Pªº°ÆÀɦW

  14.     Loop
  15. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 2# GBKEE
  1. Set sht1 = Sheets("Sheet1")
  2. Set sht2 = Sheets("Sheet2")
  3. lastrow = sht1.Cells(sht1.Rows.Count, 1).End(xlUp).Row
  4. For rw = 2 To lastrow
  5. With sht2.QueryTables.Add(Connection:= _
  6. "URL;" & sht1.Cells(rw, 1).Value _
  7. , Destination:=Sheets("Sheet2").Range("A1"))
  8. .Name = Sheet
  9. .FieldNames = False
  10. .RowNumbers = False
  11. .FillAdjacentFormulas = False
  12. .PreserveFormatting = False
  13. .RefreshOnFileOpen = False
  14. .BackgroundQuery = False
  15. .RefreshStyle = xlInsertDeleteCells
  16. .SavePassword = False
  17. .SaveData = False
  18. .AdjustColumnWidth = False
  19. .RefreshPeriod = 0
  20. .WebSelectionType = xlEntirePage
  21. .WebFormatting = xlWebFormattingNone
  22. .WebPreFormattedTextToColumns = False
  23. .WebConsecutiveDelimitersAsOne = False
  24. .WebSingleBlockTextImport = False
  25. .WebDisableDateRecognition = False
  26. .Refresh BackgroundQuery:=False
  27. End With
½Æ»s¥N½X
¦]¬°§Ú¬O¥Îweb query aspx ¨Ó¶}ÀÉ ¦ý¤£ª¾¹D­nÂI§ï

TOP

¦^´_ 3# jakcy1234
¦]¬°§Ú¬O¥Îweb query aspx ¨Ó¶}ÀÉ -> 1#ªº­þ¨ÇÀɦW¬O¦s¦b¤@­Ó¸ê®Æ®w¤¤,§A¨Ì¾Ú¬°¶}Àɪº¸ê®Æ¶Ü?(­þ¨ÇÀɮצs¦b§AªºPC,µ¹§Aªºµ{¦¡½X,¥i¥Î¶Ü!)
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 4# GBKEE

¹ï, ¨º¨ÇÀɮ׬O ±q¤U¸ü³n¥ó download ¨ì¹q¸£ ,
¦]¬°¸gºô¤W webquerytable¨údata¤ÓºC,
§Ú²{¦b¥Î cmd.exe >dir /b > filelist.txt paste ¦bsheet1 AÄæ¸Ì,
¦A¥ÎAÄæ¸Ìªºpath link ¶¶§Ç¥h¨úfile data  ( 100­Ófile¬Jdata ¤£¥Î2¤ÀÄÁ´NRUN§¹ )
==================================================
§Ú¥¿¦b±´¯Á¤¤ §Aµ{¦¡½X "error 53 file not find "
CreateObject("Scripting.FileSystemObject").GetFile(File_Name)
If UBound(Split(File_Nane, "_")) > 0 Then
ÁÙ¦³_ ªº·N«ä¬O§_­n«ü©w³o¼Ë 000000000_00000_0000_0000_0000
¦]¬°¦³4­Ó _ _ _ _            chap42589_00001_2013_0830_1457
                                   chap42590_00001_2013_0830_1458

²{¦b¥u®t¦³¨S¦³¥tÃþ¤èªk¥i¥H±N 70kb ¥H¤UªºÀÉ®× (¦b¹q¸£¦Û°Ê§R°£ ©ÎªÌ ¤£·|Ū¨ú´N¥i¥H).

TOP

¦^´_ 5# jakcy1234
¨º¨ÇÀɮ׬O ±q¤U¸ü³n¥ó download ¨ì¹q¸£ , ¤U¸ü¨ìC:\¶Ü?
¤£¬O­n­×§ï ->  File_Nane = Dir("C:\auto_download_page\*.xls")   '·j´M¸ê®Æ§¨¸Ìªº°ÆÀɦW
³o C:\auto_download_page\chap42589_00001_2013_0830_1457  ªº°ÆÀɦW¬Oxls ??
¤£¬O©Î©Ò¦³ÀÉ®× ->  File_Nane = Dir("C:\auto_download_page\*.*")   '·j´M¸ê®Æ§¨¸Ì©Ò¦³ÀÉ®×

  1. Option Explicit
  2. Sub Ex()
  3.     Dim fs As Object, File_Nane As String
  4.     Set fs = CreateObject("Scripting.FileSystemObject")
  5.     File_Nane = Dir("C:\*.xls")   '·j´M¸ê®Æ§¨¸Ìªº°ÆÀɦW
  6.     Do While File_Nane <> ""
  7.         Set fs = CreateObject("Scripting.FileSystemObject").GetFILE(File_Nane)
  8.         If UBound(Split(File_Nane, "_")) > 0 Then                              'ÀɮצWºÙ¤¤¦³ "???_???_"
  9.             If Val(Split(File_Nane, "_")(1)) >= 6 And fs.Size / 1024 > 70 Then '00006 ¥H«áªº size ¶W¹L 70kbªºÀÉ®×
  10.                 Workbooks.Open (fs)
  11.             Else
  12.                 Kill fs      '¦b¹q¸£¦Û°Ê§R°£ ' ©Î¤£Åª¨ú->µù¸Ñ³oµ{¦¡½X¤£°õ¦æ
  13.             End If
  14.         Else
  15.             Kill fs         '¦b¹q¸£¦Û°Ê§R°£ ''ÀɮצWºÙ¤¤¨S¦³ "????????_?????"
  16.                              '©Î¤£Åª¨ú -> µù¸Ñ³oµ{¦¡½X¤£°õ¦æ        
  17.         End If
  18.         File_Nane = Dir         '·j´M¸ê®Æ§¨¸Ì¤U¤@­Ó¬Û¦Pªº°ÆÀɦW
  19.     Loop
  20. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

        ÀR«ä¦Û¦b : ºw¤ô¦¨ªe¡C²É¦Ì¦¨ÅÚ¡A¤Å»´¤vÆF¡A¤Å¥Hµ½¤p¦Ó¤£¬°¡C
ªð¦^¦Cªí ¤W¤@¥DÃD