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

[µo°Ý] ¤@¦C¥u¯à¦³¤­­Ó¼Æ­È

¦^´_ 10# samwang
¤j¯«

¦pªGAÄæ¼Æ­È¦³N­Ó©O?
¦Ó¥B³Ì¦h±Æ5­ÓÄæ¦ì¦Ó¤w

TOP

¦^´_ 11# wang077

½Ð¦A´ú¸Õ¬Ý¬Ý¡AÁÂÁÂ

Sub test1()
Dim Arr, Ar(1 To 3)
Arr = Range([a1], [a65536].End(3))
x = 1: y = 2
For i = 1 To UBound(Arr)
    For j = 1 To 3
        N = N + 1: If N > UBound(Arr) Then GoTo 99
        Ar(j) = Arr(N, 1)
    Next
    Cells(x, y).Resize(3, 1) = Application.Transpose(Ar)
    If y < 6 Then y = y + 1 Else x = x + 3: y = 2
99: Next
End Sub

TOP

¦^´_ 12# samwang
¤j¯«¡A¥i¯à§Úªí¹F¤£²M·¡
§Úªº·N«ä¬OA1:A4ªº¼Æ­È¦bB1:B4
A5:A8ªº¼Æ­È¦bC1:C4
A9:A12ªº¼Æ­È¦bD1:D4
A13:A16ªº¼Æ­È¦bE1:E4
A17:A20ªº¼Æ­È¦bF1:F4

TOP

¦^´_ 13# wang077


¦]¬°±zªº³W«h¤£©ú½T¦³°ÝÃD¡A²{¦b»Ý¨DAÄæ¦ì¥u¨ì20µ§
¦pªGAÄæ¦ì°²³]¶W¹L20µ§¥H«á¡A­n«ç»ò³B²z??

TOP

¦^´_ 14# samwang
´N¬O¤£ºÞAÄ榳´Xµ§¸ê®Æ
³Ì¦h¥u¯à¥Î5­ÓÄæ¦ì¨Ó±Æ§Ç
¤]´N¬OB-FÄæ

TOP

¦^´_ 15# wang077

½Ð¦A´ú¸Õ¬Ý¬Ý¡AÁÂÁÂ

Sub test2()
Dim Arr, Ar(), N%, M%, x%, y%
Arr = Range([a1], [a65536].End(3))
M = Int(UBound(Arr) / 5): x = 1: y = 2
If M < 1 Then
    Cells(x, y).Resize(, UBound(Arr)) = Application.Transpose(Arr)
Else
    For i = 1 To UBound(Arr)
        ReDim Ar(1 To M)
        If N = UBound(Arr) Then GoTo 99
        If N = M * 5 Then
            ReDim Ar(1 To UBound(Arr) - N)
            For j = 1 To UBound(Arr) - N: N = N + 1: Ar(j) = Arr(N, 1): Next
            Cells(x, y).Resize(, UBound(Ar)) = Ar: Exit For
        End If
        For j = 1 To M: N = N + 1: Ar(j) = Arr(N, 1): Next
        Cells(x, y).Resize(UBound(Ar), 1) = Application.Transpose(Ar)
        Erase Ar
        If y < 6 Then y = y + 1 Else x = x + M: y = 2
99: Next
End If
End Sub

TOP

¦^´_ 16# samwang
´ú¸Õ¹L¤F¡A¨S°ÝÃD¡C
·PÁ¤j¯«À°¦£¡A¨¯­W¤F¡C

TOP

¦^´_ 16# samwang
Sub Openfile()
fileToOpen = Application _
        .GetOpenFilename("Excel Files(*.csv*), *.csv*", MultiSelect:=True)
        num = 0
        linenumber = 0
    For num1 = 1 To UBound(fileToOpen)
    num = num + 1
    If fileToOpen(num) <> "False" Then
    Open fileToOpen(num) For Input As #1 ' Open file for input
    Do While Not EOF(1) ' Loop until end of file
        linenumber = linenumber + 1
        Line Input #1, line
        arrayOfElements = Split(line, ",")
        elementnumber = 0
        For Each element In arrayOfElements
            elementnumber = elementnumber + 1
            Cells(linenumber, elementnumber).Value = element
        Next
    Loop
    End If
Close #1 ' Close file.
Next num1
End Sub
³o¬O§Úªºµ{¦¡½X¡A¶}¥X¨ÓªºcsvÀɳ£¬O¶Ã½X
¥Î¤F¿ý¼v¥¨¶°
µo²{¸òTextFilePlatform¦³Ãö
¤j¯«¥i¥HÀ°§Ú¶Ü

TOP

¦^´_ 18# wang077

¤£¦n·N«ä¡A¤£¤Ó¼ô±xCSVÀɮ׳o³¡¤À¡A«Øij¥i¥H¨ìExcel µ{¦¡°Ïµo¤å¡A¨ºùØ°ÝÃD¤ñ¸û¦h¤H¦bÃöª`©Î³\¥i¸Ñ±zªº°ÝÃD¡A·PÁ¡C

TOP

¦^´_ 19# samwang
¦nªº¡A·PÁ±z

TOP

        ÀR«ä¦Û¦b : ¡i¬°µ½Ävª§¡j¤H¥Í­n¬°µ½Ävª§¡A¤À¬í¥²ª§¡C
ªð¦^¦Cªí ¤W¤@¥DÃD