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

[µo°Ý] [¤w¸Ñ¨M]¶}±ÒIE«á,«ü©w¤U¸ü¸ô®|

[µo°Ý] [¤w¸Ñ¨M]¶}±ÒIE«á,«ü©w¤U¸ü¸ô®|

¥»©«³Ì«á¥Ñ HSIEN6001 ©ó 2012-6-5 22:14 ½s¿è

¨Ï¥ÎIE¶}±Ò¬Y¸ô®|¤§«á,¥X²{¤U¸üÀɮתº¸ß°Ýµøµ¡
«ü©w¤U¸ü¸ô®|ªº»yªk,¥X²{°ÝÃD
½ÐÀ°§Ú¬Ý¬Ý
  1. Sub OpenIEforSave()
  2. Dim ie As Object
  3. Set ie = CreateObject("InternetExplorer.Application")
  4. Dim Alpath As String
  5. Alpath = "D:\XXX"

  6.     ie.Visible = True
  7.     ie.Navigate "http://XXX.CSV"
  8.    
  9.     .SaveAs Filename:=Alpath & "filename.csv", FileFormat:=xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False , CreateBackup:=False       '«ü©w¸ô®|¤U¸ü
  10.    
  11.    ie.Quit
  12.    Set ie = Nothing
  13.      
  14. End Sub
½Æ»s¥N½X

¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 2# Hsieh

ÁÂÁÂ&©êºp!
³o¤£¬O§Úªº¤è¦V

¸ÓÀÉ®×Ãþ¦ü"«Ê¥]"¡A¤£¾A¥Î¥t¥~Â^¨ú¸ê®Æ
§Ú¸Õ¹LWinHttpReq.Open "GET", myURL, False
¤£¯à¥Î³o­Ó

¥u­n¥´¶}IE´Nª½±µ¸ß°Ý¤U¸ü"ÀÉ®×.csv"»P§_
§Ú·Q«ü©w¸ô®|µ¹³o"ÀÉ®×.csv"¤U¸ü

§Ú¤w¸g³]©w¶}±Ò¤ÎÃö³¬¬O¢Ý¢Ùªº
«ü©w¸ô®|»yªk¤@ª½·d¤£©w

¤£ª¾¹D¬O§_¸Ó¤U SaveToFile »yªk
ÁÙ¦³ SaveToFile  ªº»yªk«ç»ò¤U¤~¥¿½T

TOP

ªÖ©w¬O§Ú¨Sªí¹F²M·¡,¹ï¤£°_
Àɮ׬O.CSV ªº "«Ê¥]"

myURL = "http://XXX=CSV"
ª½±µ¥X²{¡e¶}±Ò¡f¡B¡eÀx¦s¡f¡B¡e¨ú®ø¡fªº¹ï¸Ü®Ø

°£¤F­nµ¹ VBA ¹ïÀ³ [Àx¦s]
¤]­nµ¹ VBA ¹ïÀ³ [Àx¦s¸ô®|]
  1. Sub OpenIEforSave()
  2. Dim ie As Object
  3. Set ie = CreateObject("InternetExplorer.Application")
  4. Dim Alpath As String
  5. Alpath = "D:\XXX"

  6. ie.Visible = True
  7. ie.Navigate "http://XXX=CSV"
  8.    
  9. Do While ie.Busy
  10.       DoEvents
  11. Loop

  12. 'MsgBox ie ¸ß°Ý----> [¶}±Ò] [Àx¦s] [¨ú®ø]  '----> VBA«ü¥O?!
  13. 'SavetoFile=Alpath & "filename.csv"        '?«ü©w¸ô®|¤U¸ü
  14. ¥H¤W' ¨â¬q,¬O§Ú¼g¤£¥X¨Óªº¦a¤è,³Â·Ðª©¤jÀ°§Ú¬Ý¬Ý
  15.    
  16. ie.Quit
  17. Set ie = Nothing
  18.      
  19. End Sub
½Æ»s¥N½X

TOP

¦^´_ 2# Hsieh

H¤j,ÁÂÁÂ!
­ì¨Ó¬O§Ú·d¿ù¤F

¥ý«e§Ú®M¥Î­ì¦³ªº¬Û¦ü»yªk¤@ª½¸Õ¤£¥X¨Ó
¥H¬°¨º­Ó¤è®×¤£¦æ

­è­è¸Õ¤@¦¸#3
¨º»yªk,¦³¸Ñ¨M§Úªº°ÝÃD
ÁÂÁ§A³á!

¦h¶¤F¤@¤j°é~¹Ä®ð~^^!!

TOP

¦^´_ 5# HSIEN6001
§A­n¤U¸üºô­¶ªº csv, xls
  1. Sub OpenIEforSave()
  2.     Dim Alpath As String
  3.     Alpath = "D:\XXX"
  4.     With Workbooks.Open("http://XXX.CSV")
  5.         .SaveAs Filename:=Alpath & "filename.csv", FileFormat:=xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, CreateBackup:=False        
  6.         .Close
  7.     End With
  8. End Sub
½Æ»s¥N½X

TOP

¦^´_ 6# GBKEE


    With Workbooks.Open
­ì¨ÓÁÙ¥i¥H³o¼Ë¨Ï¥Î,¦¬¨ì~ÁÂÁ«ü¾É!
~·P®¦~~~~^____^

TOP

¦^´_ 6# GBKEE


¦n±jªº¤èªk
¦n²³æªº¥Îªk
¨S¦³¶Wª©¤j¤jªº¤¶²Ð§¹¥þ·Q¤£¨ì³o¼Ë¤]¥i¥H¥Î...
PKKO

TOP

        ÀR«ä¦Û¦b : ·O´d¨S¦³¼Ä¤H¡A´¼¼z¤£°_·Ð´o¡C
ªð¦^¦Cªí ¤W¤@¥DÃD