- ©«¤l
- 5923
- ¥DÃD
- 13
- ºëµØ
- 1
- ¿n¤À
- 5986
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW°ò¶©
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2022-1-23
|
¦^´_ 22# luke - Option Explicit
- Sub ©îÀÉ()
- Dim Ar(), MyPath As String, E As Range, Rng As Range, xlFileName As String
- Dim ArFile(), Msg As String
- 'CurDir ¶Ç¦^¤@Ó Variant (String)¡A¥Î¨Ó¥Nªí¥Ø«eªº¸ô®|¡C
- MyPath = CurDir & "\" '¦Û¦æק勵½T¸ô®|¡C
- If Dir(MyPath & "*.csv") <> "" Then Kill MyPath & "*.csv" '§R°£¥Ø«eªº¸ô®|¤Uªº.cgs ÀÉ®×
- With Workbooks("TEST21.csv").Sheets(1)
- Ar = .Range("a:a").Value
- .Range("a:a").Replace "[*.*]", "=1/0" '[*.*] ´À¥N¬°¿ù»~È
- .Range("a:a").SpecialCells(xlCellTypeFormulas, xlErrors).Name = "xx" '©w¸q¦WºÙ: ¿ù»~ȪºÀx¦s®æ
- .Range("a:a").Value = Ar
- For Each E In .[XX]
- Set Rng = E.CurrentRegion
- Set Rng = .Range(E.Cells(2, 1), Rng.Cells(Rng.Rows.Count, Rng.Columns.Count))
- xlFileName = Replace(Replace(E, "[*", ""), "*]", "")
- With Workbooks.Add(1)
- Rng.Copy .Sheets(1).[a1]
- .SaveAs MyPath & xlFileName, xlUnicodeText
- .Close 0
- End With
- Next
- .Parent.Close 0
- End With
- End Sub
½Æ»s¥N½X |
|