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

¦p¦ó§âEXCELªºÀx¦s®æ½d³òA1:H3000¿é¥X¨ì°O¨Æ¥»Àɮתº D:\SP20110801.TXT

¦p¦ó§âEXCELªºÀx¦s®æ½d³òA1:H3000¿é¥X¨ì°O¨Æ¥»Àɮתº D:\SP20110801.TXT

¾Ç©f¤S¨Ó³Â·Ð¤j®a¤F

¥´¶} EXCEL Àɦ³¸Ô²Ó»¡©ú³á

½Ð«Ó­ô/¬ü¤kª©¥D «Ó­ô/¬ü¤k¾Çªø¸ò¾Ç©j

À°¦£¾Ç©f§¹¦¨



ÁÂÁ¤F

grt.rar (16.63 KB)

¦^´_ 1# metrostar


    µ²ªG¤£ª¾¬O§_¥¿½T
  1. Sub test()

  2.     Open "d:\SP20110801.txt" For Output As #1
  3.     For r = 1 To [A65536].End(xlUp).Row
  4.         If r = 1 Then
  5.             c = Cells(1, 11).Resize(, 7)

  6.             mystr = Join(Application.Transpose(Application.Transpose(c)), ",")
  7.         Else
  8.             x = Cells(r, 1)
  9.             If IsNumeric(x) Then
  10.                 x = [j1] & Application.Text(x, "0000")
  11.             Else
  12.                 x = [j1] & x
  13.             End If
  14.             mystr = x & "," & "20110801" & "," & Cells(r, 3) & "," & Cells(r, 4) & "," & Cells(r, 5) & "," & Cells(r, 6) & "," & Cells(r, 8)
  15.         End If

  16.         Print #1, mystr
  17.     Next
  18.     Close #1
  19. End Sub
½Æ»s¥N½X

TOP

¥»©«³Ì«á¥Ñ metrostar ©ó 2011-8-3 13:33 ½s¿è
¦^´_  metrostar


    µ²ªG¤£ª¾¬O§_¥¿½T
chin15 µoªí©ó 2011-8-3 08:15


¤Ó´Î¤F,¥i¥H¤F
¦hÁ³o¦ì«Ó­ô¾Çªø
¾Ç©f«D±`·P°Ê©O
±z¯u¬O¤Ó±j¤Ó±j¤F
·PÁ±z¨Ã¯¬¶P±z
©¯ºÖ¦n¹B¥Ã»·­°Á{±z¨­¤W

¾Ç©f¥t¥~¤@°ÝÃD,¦pªG¤£¿é¥X EXPORT TO TXT , ¦Ó§âµ²ªG¿é¥X SHEET2©O , ¤S­n«ç»ò°µ©O?
½Ð¬Ý·sªþ¤WªºÀÉ®×

Book3.rar (8.73 KB)

TOP

¦^´_ 3# metrostar
¹ï¤£°_¡A§Ú¤£¬O«Ó­ô¡A¾Çªø§ó¤£´±·í¡A¤~­è°_¨B¾Ç²ß¡C
  1. Sub test()
  2. With Sheet1
  3.     For r = 1 To .[A65536].End(xlUp).Row
  4.         If r = 1 Then
  5.             mystr = Array("<TICKER>", "<DTYYYYSSDD>", "<OPEN>", "<HIGH>", "<LOW>", "<CLOSE>", "<VOL>")
  6.         Else
  7.             x = .Cells(r, 1)
  8.             If IsNumeric(x) Then
  9.                 x = .[j1] & Application.Text(x, "0000")
  10.             Else
  11.                 x = [j1] & x
  12.             End If
  13.             mystr = Array(x, "20110802", .Cells(r, 3), .Cells(r, 4), .Cells(r, 5), .Cells(r, 6), .Cells(r, 8))
  14.         End If

  15. Sheet2.Cells(r, 1).Resize(, 7) = mystr
  16. Next
  17. End With
  18. End Sub
½Æ»s¥N½X

TOP

¥»©«³Ì«á¥Ñ metrostar ©ó 2011-8-3 14:44 ½s¿è

«Ó­ô¾Çªø°µªk¬O¥¿½Tªº,·P®¦°Õ

¦³ÂIÂI¤p°ÝÃD,¤é´Á­n·í¤Ñªº¦~¤ë¤é¤é´Á
¹³¤µ¤Ñ¬O 20110803 , ¦pªG©ú¤Ñ¬O 20110804

TOP

mystr = Array(x, Application.Text(Date, "yyyymmdd"), .Cells(r, 3), .Cells(r, 4), .Cells(r, 5), .Cells(r, 6), .Cells(r, 8))
§ï³o¦æ

TOP

¦^´_ 6# chin15

ÁÂÁ¼ӤWªº«Ó­ô¾Çªø


¦P¼Ëªºµ{¦¡¬°¤°»ò¥Î¦b book4.xls ¸ò book3.xls ¬°¤°»ò·|³o¼Ë ?????
¯uªº¦n©_©Ç³á , ¤£ª¾­ì¦]¥X¦b¨º¸Ì©O
«Ó­ô¾Çªø´£¨Ñªºµ{¦¡¬°¤°»ò¦b³oÀɮפ£¯à¥Î©O?

¥Î¦b Book3.xls ¥i¥H, ¨Ï¥Î¦b³o Book4.xls ´N¤£¦æ

Book4.rar (20.26 KB)

TOP

§Aªºsheet1[j1]ªÅµL¤@ª«¡A·íµM¬OªÅ¥Õ¤F
­ì¨Ó©ñ¦bsheet1[j1]ªºm©p§â¥L§ï¦¨©ñ¦bsheet2
¥N½X©p´N±o¸òµÛ§ï¤~·|¥¿½T°õ¦æ
If IsNumeric(x) Then
                x = Sheet2.[j1] & Application.Text(x, "0000")
            Else
                x = Sheet2.[j1] & x
            End If

TOP

¦^´_ 4# chin15


    «Øij¤Ï¦V«ä¦Ò¡A½Æ»s­n¥Î¨ìªº´XÄæ¡AµM«á¦A§ï®æ¦¡·|¤ñ¦b¨C¤@¦æ¤¤´`Àô¨ú¼Æ«K±¶¨Ç¡C

TOP

¦^´_ 9# oobird

¤Ó´Î¤F,¥i¥H¤F
¦hÁ³o¦ì«Ó­ô¶W¯Åª©¥D
¾Ç©f«D±`·P°Ê©O
±z¯u¬O¤Ó±j¤Ó±j¤F
·PÁ±z¨Ã¯¬¶P±z
©¯ºÖ¦n¹B¥Ã»·­°Á{±z¨­¤W

¾Ç©f ÁÙ¦³¤p¤p°ÝÃD
¦pªG¹J¨ì I1Àx¦s®æªº MY ®É , J1Àx¦s®æ¬°ªÅ
·Q­n A2:A65536 ªº¯Â¼Æ¦r¬°4¦ì¼Æ,¤£¨¬«e­±¸É0
¨Ò¦p A2 Àx¦s®æ ¥Ø«e¬° 12,­n 0012 ¤~¹ï «ç»ò°µ©O ?

Book4.rar (20.51 KB)

TOP

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