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

[µo°Ý] ¤@¦¸§å§ï¤j¶qÀɮצWºÙªº»yªk¡C

[µo°Ý] ¤@¦¸§å§ï¤j¶qÀɮצWºÙªº»yªk¡C

¥»©«³Ì«á¥Ñ ziv976688 ©ó 2019-11-1 16:26 ½s¿è

´ú¸ÕÀɮסJ TEST-1.rar (21.31 KB)         PS¡J´ú¸ÕÀɮפº¦³ªþ¤W´ú¸Õ¥ÎªºcsvÀÉ®×

»¡©ú³Æµù¡J
A¦WºÙÀÉ®×= ####-####-(°ò·Ç¤é¡Gyyyy-mm-dd).csv  
B¦WºÙÀÉ®×= ####-####-( yyyy-mm-dd).xis  
C¦WºÙÀÉ®×= 539_####-####-( yyyy-mm-dd).xis

ªþ¥ó¤¤ªºµ{¦¡¥DÀɤw¦³±NA¦WºÙªº.csvÀɮק妸§ï¬°B¦WºÙªº.xisÀɮתºµ{¦¡½X¡C
EX¡J¤K¨ö±Æ§Ç-¾÷¼ÆÁ`Äý-(°ò·Ç¤é¡G2019-09-20).csv  => ¤K¨ö±Æ§Ç-¾÷¼ÆÁ`Äý-(2019-09-20).xls

·s¼W»Ý¨D¡J
±NB¦WºÙÀɮצA§å¦¸§ï¬°C¦WºÙÀÉ®×~
EX¡J¤K¨ö±Æ§Ç-¾÷¼ÆÁ`Äý-(2019-09-20)  => 539_¤K¨ö±Æ§Ç-¾÷¼ÆÁ`Äý-(2019-09-20)
EX¡J¤­¦æ±Æ§Ç-ªÅ¼ÆÁ`Äý-(2019-08-19)  => 539_¤­¦æ±Æ§Ç-ªÅ¼ÆÁ`Äý-(2019-08-19)

½Ð°Ý¡J·s¼W»Ý¨DªºVBA»yªk¡H
ÁÂÁ¡I

¦^´_ 1# ziv976688


¦pªG­ìµ{¦¡¬O§A¦Û¤v¼gªº¡A¨º³o­Ó¹ï§A¨Ó»¡À³¸Ó¤£Ãø§a!?

    Sub Ex()
        Dim Path As String, A As String, Oldname As String, Newname As String
        Path = ThisWorkbook.Path  '¸ô®|
        A = Dir(Path & "\*.CSV")
        Do While A <> ""
            Oldname = Path & "\" & A
            A = Replace(A, "°ò·Ç¤é¡G", "")
            A = "539_" & A '·s¼W»Ý¨D:¦A±NÀɮצWºÙ«e§å§ï¼W¥[ "539_"
            A = Replace(A, ".csv", ".xls")
            Newname = Path & "\" & A
            'Name Oldname As Newname   '§ï¦WºÙ
             With Workbooks.Open(Oldname)
                 .SaveAs Filename:=Newname, FileFormat:=xlNormal   '§ï°ÆÀɮצW
                 .Close True
             End With
            Kill Oldname
            A = Dir
        Loop
    End Sub


¤@¦¸§å§ï¤j¶qÀɮצWºÙ(µ{¦¡¥DÀÉ).rar (9.5 KB)
µ{¦¡¬O¨Ì»Ý¨D¼gªº¡A»Ý¨Dªí¹F¤£²M·¡
©ÎªÌ¨S¦³¤W¶Çªþ¥ó¡A·R²ö¯à§U

TOP

¦^´_ 2# n7822123
¤£¦n·N«ä¡A­ìµ{¦¡½X¦¡¤U¸üGBKEE¤j¤j¸Ñµª½×¾Â¨ä¥Lºô¤Íªºµ{¦¡½X^^"
´ú¸ÕOK¤F!¤£³Ó·P¿E!

TOP

¥»©«³Ì«á¥Ñ ziv976688 ©ó 2019-11-13 02:02 ½s¿è

¦^´_ 2# n7822123
        
¤£¦n·N«ä¡A¦]¬°¸Ñµªµ{¦¡½Xªº¬yµ{Ãö«Y¡A¾É­P¤u§@ªíªº¦WºÙ¦³BUG(EX : 539_¤K¨ö±Æ§Ç-¾÷¼ÆÁ`Äý-(2019-09-20)_¥Ø«e)¡C
½Ð¨£ : ¥ªÃä¹Ï¤ùªº¤u§@ªí¦WºÙ¡C

§Ú¥H¤â°Êªº¬yµ{¨BÆJ§@»¡©ú¡J
1_ª½±µÂIÀÉ®×=>­«·s©R¦W=>±NÀɮצWºÙªº"°ò·Ç¤é:"²¾°£¡A¨Ã¦bÀɮצWºÙ«e¼W¥["539_"
2_¶}±ÒÀÉ®×=>ÂI¤W¤èªº"ÀÉ®×(F)"=>¿ï"¥t¦s·sÀÉ(A)"=>"ÀÉ®×Ãþ«¬(T)"¿ï"Microsoft Office Excel ¬¡­¶Ã¯"(§Yxls)=>"Àx¦s(S)"¡C
3_Ãö³¬ÀÉ®×
EX : 539_¤K¨ö±Æ§Ç-¾÷¼ÆÁ`Äý-(2019-09-20)_»Ý¨D
½Ð¨£ : ¥kÃä¹Ï¤ùªº¤u§@ªí¦WºÙ¡C
4_²¾°£.csvÀÉ®×


½Ð°Ý¡J¥Ø«eµ{¦¡½Xªº¬yµ{¨BÆJÀ³¸Ó¦p¦ó­×¥¿¡H
ÁÂÁ±z^^

´ú¸ÕÀÉ : TEST(1113).rar (30.32 KB)

TOP

¥»©«³Ì«á¥Ñ n7822123 ©ó 2019-11-14 00:41 ½s¿è

¦^´_ 4# ziv976688


¦]¬°§A­ì¥»ªºCSVÀÉ¡A¤u§@ªí¦WºÙ¦³«_¸¹¡A¹H¤Ï¤F¤u§@ªí¦WºÙªº©R¦W¤è¦¡
©Ò¥H¦sÀÉ«á¦A¶}´N·|Åܦ¨³o¼Ë¤F¡A¥u­n§â¤u§@ªí¦WºÙ¤]§ï±¼´N¦æ¤F¡A¦p¤U


    Option Explicit
    Sub Ex()
        Dim oPath As String, A As String, Oldname As String, Newname As String
        Application.ScreenUpdating = False
        oPath = ThisWorkbook.Path  '¸ô®|
        A = Dir(oPath & "\*.CSV")
        Do While A <> ""
            Oldname = oPath & "\" & A
            A = Replace(A, "°ò·Ç¤é¡G", "")
            A = "539_" & A '·s¼W»Ý¨D:¦A±NÀɮצWºÙ«e§å§ï¼W¥[ "539_"
            A = Replace(A, ".csv", ".xls")
            Newname = oPath & "\" & A
             With Workbooks.Open(Oldname)
                .Sheets(1).Name = Replace(A, ".xls", "")
                .SaveAs Filename:=Newname, FileFormat:=xlNormal   '§ï°ÆÀɮצW
                .Close True
             End With
            Kill Oldname
            A = Dir
        Loop
    End Sub


¤@¦¸§å§ï¤j¶qÀɮצWºÙ(µ{¦¡¥DÀÉ)_n¤j.rar (9.82 KB)
µ{¦¡¬O¨Ì»Ý¨D¼gªº¡A»Ý¨Dªí¹F¤£²M·¡
©ÎªÌ¨S¦³¤W¶Çªþ¥ó¡A·R²ö¯à§U

TOP

¦^´_ 5# n7822123
n¤j :
OK¤F!·P®¦

TOP

        ÀR«ä¦Û¦b : ­n¥Î¤ß¡A¤£­n¾Þ¤ß¡B·Ð¤ß¡C
ªð¦^¦Cªí ¤W¤@¥DÃD