Board logo

¼ÐÃD: [µo°Ý] ½Ð±Ð*.csvÀÉ¡A¦p¦ó¦bÀx¦s®æ¥[¤WÃC¦â«á¡A¦A¦s¦¨.csvÀÉ~~ [¥´¦L¥»­¶]

§@ªÌ: vesperlee    ®É¶¡: 2013-12-14 22:41     ¼ÐÃD: ½Ð±Ð*.csvÀÉ¡A¦p¦ó¦bÀx¦s®æ¥[¤WÃC¦â«á¡A¦A¦s¦¨.csvÀÉ~~

½Ð±Ð*.csvÀÉ¡A¦p¦ó¦bÀx¦s®æ¥[¤WÃC¦â«á¡A¦A¦s¦¨.csvÀÉ~~

½Ð±Ð¦p¦ó¨Ï¥ÎVBA¶}±Ò¤@­Ó"´ú¸Õ.csv"ÀÉ«á¡A°Æµ{¦¡ùئb"´ú¸Õ.csv"Àɤº¹Bºâ¡A
¨Ã¦bÀx¦s®æ¤º¥[¤WÃC¦â¡C¦ý¦b¦sÀÉ«á¡AÃC¦â·|¤£¨£¡C

½Ð±Ð¦p¦ó¨Ï¥ÎVBA¡A¶}±Ò"´ú¸Õ.csv"ÀÉ«á¡A¹Bºâ§¹¦sÀɦ¨  "´ú¸Õ.csv" (Âл\­ì¥»ªºÀÉ)
¦Ó¤£¬O ¥t¦s¦¨¤@­Ó  "´ú¸Õ.xls"  ªº·sÀÉ¡C

ÁÂÁ¡I·P®¦~~¡C
¥H¤U¬° ¬ÛÃö°ÝÃD¸ê®Æ¡C·P®¦~«ü±Ð~~~¡C


[attach]17055[/attach]
§@ªÌ: vesperlee    ®É¶¡: 2013-12-15 02:20

Sub test()
   Get_Path_LEN = Len(Application.ActiveWorkbook.FullName)    '¨ú±oÀɮק¹¾ã¦W¸ô®|¤Î¦WºÙ
   Get_Date_name_LEN = Len(Application.ActiveWorkbook.Name)        '¨ú±o ÀÉ®×  ¦WºÙ
   Full_path_name = Left((Application.ActiveWorkbook.FullName), Get_Path_LEN - Get_Date_name_LEN) '¨ú±o §¹¾ã¸ô®|
   
Open_download_Date = Full_path_name & "´ú¸Õ.csv"
     Workbooks.Open Open_download_Date  ' ¶}±Ò  ÀÉ®×
     
           '¹Bºâ´ú¸ÕÀÉ(¦bcsv¥[¤J¹Bºâ¤ÎÃC¦â)
                                                           
     Workbooks("´ú¸Õ.csv").Close SaveChanges:=True  '====>>>>>¦sÀÉ«á  *.csvÃC¦âÁÙ¬O¤£¨£¤F¡H
Application.DisplayAlerts = True  '«ì´_ĵ§iµøµ¡
   
End Sub


¥Î³o­Ó¤èªk¡AÁÙ¬O¨S¿ëªk§ïµ½¡A*.csvÃC¦âÁÙ¬O·|¤£¨£¡I
³Â·Ð«ü±Ð~~~¡AÁÂÁÂ~~~
§@ªÌ: GBKEE    ®É¶¡: 2013-12-15 15:12

¦^´_ 2# vesperlee

csv¬O¤å¦r®æ¦¡ªºÀÉ®×,¤£¥iÀx¦s,Àx¦s®æªº(¦r«¬¤Î¤j¤p,¹Ï¼ËÃC¦â.¤½¦¡...)
§@ªÌ: vesperlee    ®É¶¡: 2013-12-15 16:22

´Ý©À~~~¡I
­è­è¬Ý¤F¤@¤U¡A*.csvÀÉ©M*.xlsÀÉ  ªº¤j¤pªG¯u®t«Ü¦h¡C­ì¨Ó*.csv¬O¤å¦r®æ¦¡ªºÀÉ®×,
ÁÂÁ  GBKEE ¤j¤jªº»¡©ú¡C




Åwªï¥úÁ{ ³Â»¶®a±Ú°Q½×ª©ª© (http://forum.twbts.com/)