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

[µo°Ý] Àɮ׿é¥X

[µo°Ý] Àɮ׿é¥X

¥»©«³Ì«á¥Ñ ken759727 ©ó 2012-6-17 22:59 ½s¿è

§Ú¬O±Nexcel ¸Ì­±ªº¼Æ­È ¿é¥X¦¨°O¨Æ¥»ÀÉ®×

°ÝÃD1. excel ¸Ì­±Åã¥Ü 0.01156258 ¦ý¬O¿é¥X¦¨µ§°O¥»¤§«á¡A«oÅܦ¨ 1.15625797922245E-02¡A½Ð°Ý§Ú­n¦b­þ¤@³¡¤À°µ­×§ï

°ÝÃD2.½Ð°Ý¿é¥X¸ô®|¥Ø«e¬Oª½±µ¼g¦b E:\ ¡A½Ð°Ý¦³¿ìªk§ï¦¨ ¿é¥X¸ô®|»Pexcel ¸ô®|¬Û¦P¶Ü

°ÝÃD3.¥Ø«e¥\¯à¬O§â A10~J311 ¿é¥X¦¨ °O¨Æ¥»ÀɮסA¦³­þÃä¬O§_¯à§ï¨}ªº

ÁÂÁ¦U¦ì
  1. Sub ¿é¥X()
  2. Dim i As Integer
  3. Dim j As Integer
  4. Dim a As Object
  5. Sheet1.Activate

  6. fd = 20 & Range("A2") & "_" & Range("B2") & Range("C2")  '¦WºÙ
  7. Set fs = CreateObject("Scripting.FileSystemObject")
  8. Set a = fs.CreateTextFile("E:\" & fd & ".TXT", True)[color=Red] '¸ô®|

  9. i = 311
  10. j = 10

  11. For x = 10 To i 'Step 3¡@'¸ê®Æ½d³ò
  12. For y = 1 To j 'Step 1¡@
  13. a.write (Cells(x, y))
  14. If y <= j - 1 Then a.write (vbTab)
  15. Next
  16. a.write (vbCrLf)
  17. Next
  18. a.Close

  19. Range("S1") = fd  '´ú¦¡¦WºÙ
  20. End Sub
½Æ»s¥N½X

¦^´_ 4# Hsieh

¸U¤À·PÁ¡A¥H¸Ñ¨M¡C

TOP

¦^´_ 3# ken759727

a.write Cells(x, y).Text
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 2# GBKEE

·PÁÂ..¸ô®|°ÝÃD¸Ñ¨M¤F

Ãö©ó excel ¸Ì­±Åã¥Ü 0.01156258  ¿é¥X¤§«áÁÙ¬OÅܦ¨    1.156258E-02
§Ú¦³§â¤å¦r®æ§ï¦¨¤å¦r  ¿é¥X¤]ÁÙ¬O¤@¼Ë¡A·|Åã¥Ü¬ì¾Ç²Å¸¹

TOP

¦^´_ 1# ken759727
¸Õ¸Õ¬Ý
  1. fp = ThisWorkbook.Path & "\"                            'Excelªº ¸ô®|
  2. fd = 20 & Range("A2").Text & "_" & Range("B2").Text & Range("C2").Text  '¦WºÙ
  3. Set fs = CreateObject("Scripting.FileSystemObject")
  4. Set A = fs.CreateTextFile(fp & fd & ".TXT", True) '¸ô®|
½Æ»s¥N½X

TOP

        ÀR«ä¦Û¦b : ¤H¥Í¨S¦³©Ò¦³Åv¡A¥u¦³¥Í©Rªº¨Ï¥ÎÅv¡C
ªð¦^¦Cªí ¤W¤@¥DÃD