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

EXCEL§ì¨úCSV¸ê®Æ¨Ã§Y®É§ó·s

EXCEL§ì¨úCSV¸ê®Æ¨Ã§Y®É§ó·s

§ÚªºÀɮפº®e¦p¤U ¬OCSV®æ¦¡
tttt.rar (136 Bytes)
5­Ó¸ê°T §Ú¥ÎÃC¦âÅã¥Ü ¤ñ¸û®e©öÅý¦U¦ì¤j¤j¤F¸Ñ§Úªº·N«ä
¤p«¬¥x«ü¤ë   ©_ª°_¸Õ¥Î   2013/12/26 12:17:00   8500   1   

§Ú·Q­n¥Î¤@­ÓEXCELÀÉ
±N¤W­±ªº5­Ó¸ê°T
¤À§O¸ü¤J¦ÜEXCELªº A1-E1­Ó§OÀx¦s®æ(1­ÓÀx­È®æ¶ë1­Ó¸ê°T)
¨Ã·|¤@ª½§ó·s
¤]´N¬O
¥u­nCSVªº¸ê®Æ¦³ÅÜ°Ê
EXCEL¤]·|°¨¤W¸òµÛÅÜ°Ê

­n¦³¤W­z¦¹ºØ¥\¯à VBA»yªk­n¦p¦ó¼g

¦^´_ 21# bqwangs
  1. Application.OnTime Time + #12:00:01 AM#, "¤u§@ªí1.Ex"
  2. 15.    'µ{¦¡¦bª«¥ó¼Ò²Õ OnTim ­n«ü©ú ¼Ò²Õ¦WºÙ (¤u§@ªí1 ¬Oª«¥ó¼Ò²Õ)
½Æ»s¥N½X
  1. 'This Workbook¬O (ª«¥ó¼Ò²Õ)
  2. Private Sub Workbook_Open()
  3. Ex
  4.         End Sub
  5. =============
  6. 'Module1¸Ì©ñµ{¦¡(Module1¬O¤@¯ë¼Ò²Õ)
  7. Sub Ex()   
  8.     Dim Ar As Variant, E As Range, i As Integer
  9.     'd:\  ½Ð­×§ï¬°¥¿½T¸ô®|
  10.     With GetObject("d:\tttt.csv").Sheets(1)
  11.         Ar = Split(Trim(.[a1]), Space(2))
  12.         .Parent.Close 0
  13.     End With
  14.     i = 0
  15.     For Each E In ActiveSheet.[A1,A2,B5,E5,C5]
  16.         E = Ar(i)
  17.         i = i + 1
  18.     Next
  19.     Application.OnTime Time + #12:00:01 AM#, "Ex"
  20.     'µ{¦¡¦bª«¥ó¼Ò²Õ OnTim ­n«ü©ú ¼Ò²Õ¦WºÙ,(Module1¬O¤@¯ë¼Ò²Õ OnTim¥i¥H¤£«ü©ú ¼Ò²Õ¦WºÙ)
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

ª©¤j
§Ú¬Oµ{¦¡¤j¥~¦æ
1.¤W­zªºµ{¦¡ ¬O©ñ¨ì¤u§@ªí1ªºVB¸Ì
ÁÙ¬O©ñ¨ìModule1¶Ü??
2.Application.OnTime Time + #12:00:01 AM#, "¤u§@ªí1.Ex"
'µ{¦¡¦bª«¥ó¼Ò²Õ OnTim ­n«ü©ú ¼Ò²Õ¦WºÙ
¬O­n§ï¦¨??
Application.OnTime Time + #12:00:01 AM#, "Module1.Ex"
3.§Ú±Nµ{¦¡©ñ¨ì¤u§@ªí1ªºVB¸Ì
ÁÙ¬O­n¥h «ö¥¨¶° ¦A«ö°õ¦æ
­n¦p¦óÅܦ¨¤@¶}ÀÉ®× ´N°¨¤W·|°õ¦æ

=============
This Workbook¸Ì
Private Sub Workbook_Open()
Ex
        End Sub
=============
Module1¸Ì©ñµ{¦¡
Sub Ex()
    Dim Ar As Variant, E As Range, i As Integer
    'd:\  ½Ð­×§ï¬°¥¿½T¸ô®|
    With GetObject("d:\tttt.csv").Sheets(1)
        Ar = Split(Trim(.[a1]), Space(2))
        .Parent.Close 0
    End With
    i = 0
    For Each E In ActiveSheet.[A1,A2,B5,E5,C5]
        E = Ar(i)
        i = i + 1
    Next
    Application.OnTime Time + #12:00:01 AM#, "¤u§@ªí1.Ex"
    'µ{¦¡¦bª«¥ó¼Ò²Õ OnTim ­n«ü©ú ¼Ò²Õ¦WºÙ
=====================
¿ù»~°T®§

TOP

¦^´_ 19# bqwangs
  1. Option Explicit
  2. Sub Ex()
  3.     Dim Ar As Variant, E As Range, i As Integer
  4.     'd:\  ½Ð­×§ï¬°¥¿½T¸ô®|
  5.     With GetObject("d:\tttt.csv").Sheets(1)
  6.         Ar = Split(Trim(.[a1]), Space(2))
  7.         .Parent.Close 0
  8.     End With
  9.     i = 0
  10.     For Each E In ActiveSheet.[A1,A2,B5,E5,C5]
  11.         E = Ar(i)
  12.         i = i + 1
  13.     Next
  14.     Application.OnTime Time + #12:00:01 AM#, "¤u§@ªí1.Ex"
  15.     'µ{¦¡¦bª«¥ó¼Ò²Õ OnTim ­n«ü©ú ¼Ò²Õ¦WºÙ

  16. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

ª©¤j
¦ý§Ú¸ÕµÛ¥Î «ö¥¨¶° ¦A«ö°õ¦æ
¥L·|¤@ª½§ó·s¸òcsvÀɮפ@¼Ëªº¸ê°T
¦³¿ìªk§ï¦¨ ¨C¬í ¦Û°Ê§@  «ö¥¨¶° ¦A«ö°õ¦æ1¦¸¶Ü??

¤§«e¸ê®ÆÂ^¨úÀx­È®æ¦ì¸m¬OA1-E1
¦ý¦pªG§Ú­n§ï¦¨A1 A2 B5 E5 C5
¨º¤S­n¦p¦ó§ï??

TOP

¦^´_ 17# bqwangs
§A»¡ ¥u­nCSVÀÉÅÜ°Ê EXCELÀx¦s®æ¸ê®Æ ¤]¸òµÛÅÜ°Ê
¥ÎCSVÀɵLªk§ó·s³sµ²
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¥»©«³Ì«á¥Ñ bqwangs ©ó 2014-1-8 11:14 ½s¿è

¦^´_ 16# GBKEE

ª©¤j
§Ú¨Ì±zªº¤è¦¡
§Ë¤F¤@­ÓÀÉ
t1.rar (12.93 KB)

¥L¶}±Ò®É »Ý¥h«ö¥¨¶° ¦A«ö°õ¦æ
¤~·|§ì¨ú¸ê®Æ
¦ý­n¦p¦ó ÅýÀɮ׶}±Ò®É
§Y¦Û°Ê§ì¸ê®Æ ¤]·|¤@ª½§ó·s(¥u­nCSVÀÉÅÜ°Ê EXCELÀx¦s®æ¸ê®Æ ¤]¸òµÛÅÜ°Ê)
Ãþ¦ü¦P¨B

¤§«e¸ê®ÆÂ^¨úÀx­È®æ¦ì¸m¬OA1-E1
¦ý¦pªG§Ú­n§ï¦¨A1 A2 B5 E5 C5
¨º¤S­n¦p¦ó§ï??

TOP

¦^´_ 15# bqwangs
14# ªºµ{¦¡½X,¥i¤£¶}ÀÉŪ¨ú¸ê®Æ,2003¥i¥¿±`°õ¦æ.

¥t¹õ«á¶}ÀÉŪ¨ú¸ê®Æ,¥i°Ñ¦Ò
  1. Option Explicit
  2. Sub Ex()
  3.     Dim Ar
  4.     'd:\  ½Ð­×§ï¬°¥¿½T¸ô®|
  5.     With GetObject("d:\tttt.csv").Sheets(1)
  6.         Ar = Split(Trim(.[a1]), Space(2))
  7.         .Parent.Close 0
  8.     End With
  9.     With ActiveSheet.[a1:e1]
  10.         .Value = Ar
  11.         .Value = .Value
  12.     End With
  13. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¥»©«³Ì«á¥Ñ bqwangs ©ó 2014-1-7 20:41 ½s¿è

¶W¯Åª©¥D
§Úªºª©¥»¬O2010ªº
§Ú¸Õ¤F
¤£¦æ
¬O§Ú¤£·|§Ë
¥i¥HÀ°¦£°µ¤@­ÓÀɮ׶Ü
¨Ñ§Ú¤U¸ü

TOP

¦^´_ 12# bqwangs
  1. Option Explicit
  2. Sub Ex()
  3.     Dim Ar
  4.     Ar = ExecuteExcel4Macro("'d:\[tttt.csv]tttt'!R1C1")
  5.     'd:\  ½Ð­×§ï¬°¥¿½T¸ô®|
  6.     Ar = Split(Trim(Ar), Space(2))
  7.     With ActiveSheet.[a1:e1]
  8.         .Value = Ar
  9.         .Value = .Value
  10.     End With
  11. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

        ÀR«ä¦Û¦b : ¬Ý§O¤H¤£¶¶²´¡A¬O¦Û¤v­×¾i¤£°÷¡C
ªð¦^¦Cªí ¤W¤@¥DÃD