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

[µo°Ý] ½Ð±ÐÃö©ó"¤£¥´¶}ExcelÀɮסA¼g¸ê®Æ¨ìÀx¦s®æ¸Ì"

[µo°Ý] ½Ð±ÐÃö©ó"¤£¥´¶}ExcelÀɮסA¼g¸ê®Æ¨ìÀx¦s®æ¸Ì"

½Ð±Ð¥ý¶i­Ì
·Q­n§âExcel"¬¡­¶Ã¯1"¸ÌÀx¦s®æA1("ex:123")ªº­È¡A½Æ»s¨ì ¨S¥´¶}ªºExcel"¬¡­¶Ã¯2"Àx¦s®æA1¸Ì¤§«á¦sÀÉ

ª¦¤å³£¥u§ä¨ì ¦b¤£¥´¶}ªº±¡ªp¤U"Àò¨ú­È"¡A§ä¤£¨ì"¼g¤J­È"ªº¬ÛÃö¤å³¹

½Ð°Ý¥ý¶i­Ì  ¤£¥´¶}ªº±¡ªp¤U¼g¤J­È ¬O¥i¦æªº¶Ü? ·PÁ¦^µª

¥»©«³Ì«á¥Ñ HSIEN6001 ©ó 2015-1-12 12:48 ½s¿è

¦^´_ 1# rbktwi


    ¨S¥´¶}ªºExcel"¬¡­¶Ã¯2"Àx¦s®æA1¸Ì,¿é¤J
=[¬¡­¶Ã¯1.xls]Sheet1!A1
or
='[¬¡­¶Ã¯1.xls]Sheet1'!A1

¥´¶}¬¡­¶Ã¯2®É,¦ý¨S¦³¶}±Ò¬¡­¶Ã¯1--->·|¸ß°Ý§ó·s & ¤£­n§ó·s
¨â­Ó¬¡­¶Ã¯³£¦³¶}±Ò,·|¦Û°Ê§ó·s

TOP

¦^´_ 2# HSIEN6001

©êºp­è§Ñ°O³Æµù

Á|¨Ò¬¡­¶Ã¯2ªº³¡¤À¦]¬°¼Æ¶q¦h¡A¨S¿ìªk¤@¤@¥ý§â¨ç¼Æ©ÎªÌvba«Ø¥ß¦n¡A©Ò¥Hµ¥©ó¬O­n¦b¬¡­¶Ã¯1³B²z§¹¡A¦b¤£¥´¶}¬¡­¶Ã¯2ªº±¡ªp¤U¡A§â­È¼g¤J¨ì¬¡­¶Ã¯2ªºÀx¦s®æ¸Ì¡C

·PÁÂHSIEN6001¦^ÂлP´£¿ô!

TOP

¦^´_ 3# rbktwi

Ãø²z¸Ñ¬O.... ¬¡­¶Ã¯2¦h? ....    ¬¡­¶Ã¯1³B²z§¹
¶Ç¤Wªþ¥ó°Ñ¦Ò,¤~¯à²z¸Ñ§A­nªº»Ý¨D

TOP

¥»©«³Ì«á¥Ñ rbktwi ©ó 2015-1-12 15:28 ½s¿è

©êºp~HSIEN6001

¨º³o¼Ë»¡ªº¸Ü

Á|¨Ò ¬¡­¶Ã¯1 »P ¬¡­¶Ã¯2 ¬¡­¶Ã¯3 ¬¡­¶Ã¯4 ~ ¬¡­¶Ã¯100

­n§â¬¡­¶Ã¯1¸ÌA1ªº­È(ex:123)¡A¼g¤J¨ì¬¡­¶Ã¯2~100¡AÁ`¦@99­Ó¬¡­¶Ã¯ªºA1¸Ì

¦b¬¡­¶Ã¯2~100¤£»Ý­n"¶}±Ò" »P "¼g¤J¥ô¦ó¨ç¼Æorµ{¦¡" ªº±¡ªp¤U¡A

¬¡­¶Ã¯1¸Ó«ç»ò½s¼g¨ç¼Æ©Îµ{¦¡½X¤~¯à¹F¨ì"¼g­È¨ì¨ä¥L¬¡­¶Ã¯¸Ì"©O?  ·PÁ¦^ÂÐ~

TOP

¦^´_ 5# rbktwi


    ¤£¥´¶},«ç»ò©ñ¤J¸ê®Æ???
  1. Sub ¦P¸ê®Æ§¨¤º¤j¶qÀɮצs¨ú()
  2.     Dim Path As String, file As String
  3.     Application.ScreenUpdating = False  'Ãö³¬«Ì¹õ§ó·s
  4.     Path = "C:\¸ê®Æ§¨\"                 '¨Ó·½¸ê®Æ§¨,¦Û¦æ­×¥¿
  5.     file = Dir(Path & "*.xls")          '¨Ó·½ÀɦW, ªí¥Üªk "*.xls" or "*.csv" or "ÃöÁä¦r*.xls"
  6.         Do While file <> ""
  7.             Application.DisplayAlerts = False       '¤@¯ë´£Äµ¥Ü°T®§Ãö³¬
  8.             With Workbooks.Open(Path & file)
  9.                 [A1] = "=[¬¡­¶Ã¯1.xls]Sheet1!A1"    '¬¡­¶Ã¯1.xls ¦WºÙ¦Û¦æ­×¥¿
  10.                 ActiveWindow.Close True
  11.             End With
  12.             file = Dir
  13.         Loop
  14. End Sub
½Æ»s¥N½X

TOP

¦^´_ 6# HSIEN6001

©êºp!¤Ö¤F¬õ¦r¨º¤@¦æ

    Sub ¦P¸ê®Æ§¨¤º¤j¶qÀɮצs¨ú()
    Dim Path As String, file As String
    Application.ScreenUpdating = False  'Ãö³¬«Ì¹õ§ó·s
    Path = "C:\¸ê®Æ§¨\"                 '¨Ó·½¸ê®Æ§¨,¦Û¦æ­×¥¿
    file = Dir(Path & "*.xls")          '¨Ó·½ÀɦW, ªí¥Üªk "*.xls" or "*.csv" or "ÃöÁä¦r*.xls"
        Do While file <> ""
            Application.DisplayAlerts = False       '¤@¯ë´£Äµ¥Ü°T®§Ãö³¬
            With Workbooks.Open(Path & file)
                [A1] = "=[¬¡­¶Ã¯1.xls]Sheet1!A1"    '¬¡­¶Ã¯1.xls ¦WºÙ¦Û¦æ­×¥¿
                ActiveWindow.Close True
            End With
            file = Dir
        Loop
    Application.ScreenUpdating = True   '¥´¶}«Ì¹õ§ó·s
End Sub

TOP

¤F¸Ñ~ ­ì¨Ó¤@©w­n¥´¶}¡C ·PÁÂHSIEN6001 ~

TOP

Sub ¹õ«á¶}±ÒEXCEL_¼g¤J()
Dim X As New Application
With X.Workbooks.Open("D:\XXX.xls")
¡@¡@.Sheets("Sheet1").[A65536].End(xlUp)(2) = Now
¡@¡@.Close 1
End With
End Sub

TOP

        ÀR«ä¦Û¦b : ¤Hªº²´·úªø¦b«e­±¡A¥u¬Ý¨ì§O¤Hªº¯ÊÂI¡Aµ·²@¬Ý¤£¨ì¦Û¤vªº¯ÊÂI¡C
ªð¦^¦Cªí ¤W¤@¥DÃD