ÈçºÎ´Ó Microsoft Access ÄÚµ÷Óà Excel º¯Êý
ÕâƪÎÄÕÂÖеÄÐÅÏ¢ÊÊÓÃÓÚ: Microsoft Access 2000±¾Îĵķ¢²¼ºÅÔøΪ CHS198571 ±¾ÎÄÊÊÓÃÓÚ Microsoft Access Êý¾Ý¿â (.mdb) ºÍ Microsoft Access ÏîÄ¿ (.adp)¡£ ¸ß¼¶Óû§£ºÒªÇó¾ßÓи߼¶±à³Ì¡¢»¥²Ù×÷ÐԺͶàÓû§¼¼ÇÉ¡£ ¸ÅÒª ±¾ÎÄ˵Ã÷ÈçºÎʹÓá°×Ô¶¯»¯¡±¹¦ÄÜ´Ó Microsoft Access ÄÚµ÷Óà Microsoft Excel º¯Êý¡£ ¸ü¶àÐÅÏ¢ Microsoft Excel ÓÐһЩ Microsoft Access ûÓеĺ¯Êý£¬ÀýÈ磬ͳ¼Æº¯ÊýºÍ¼ÓÔØÏÊý¡£Í¨¹ýʹÓá°×Ô¶¯»¯¡±¹¦ÄÜ£¬¿ÉÒÔÔÚ Access ÖÐʹÓÃÕâЩ Excel º¯Êý¡£Îª´Ë£¬ÏÈÇëÉèÖÃ¶Ô Microsoft Excel ¶ÔÏó¿âµÄÒýÓá£
ÒªÉèÖÃ¶Ô Microsoft Excel ¶ÔÏó¿âµÄÒýÓã¬ÇëÖ´ÐÐÏÂÁв½Ö裺 ÔÚ Access ÖУ¬°´ ALT+F11 Çл»µ½ Visual Basic ±à¼Æ÷¡£ ÔÚ¹¤¾ß²Ëµ¥ÉÏ£¬µ¥»÷ÒýÓᣠÔÚÒýÓÿòÖУ¬µ¥»÷ Microsoft Excel 9.0 Object Library ¸´Ñ¡¿ò£¬È»ºóµ¥»÷È·¶¨¡£ ÉèÖÃÒýÓú󣬿ÉÒÔʹÓá°¶ÔÏóä¯ÀÀÆ÷¡±²é¿´ËùÓÐ Microsoft Excel µÄ¶ÔÏó¡¢ÊôÐԺͷ½·¨£¬°üÀ¨Í¨¹ý Application ¶ÔÏó¿ÉÓõĺ¯Êý¡£ ÒÔÏÂÁ½¸öʾÀý³ÌÐòÖÐʹÓÃÁË Microsoft Excel µÄͳ¼Æº¯Êý¡£ ±¸×¢£ºÍ¨¹ý¡°×Ô¶¯»¯¡±¹¦ÄÜ´ò¿ª Excel Ö®ºó£¬Excel ²»×Ô¶¯¹Ø±Õ¡£ÒÔÏÂʾÀý³ÌÐòÖÐʹÓà Quit ·½·¨¹Ø±Õ Excel¡£ÓйØÍ˳ö Excel µÄÆäËüÐÅÏ¢£¬Çë²Î¼û Microsoft Knowledge Base ÖеÄÒÔÏÂÎÄÕ£º 210129 ACC2000£ºÍ¨¹ý¡°×Ô¶¯»¯¡±¹¦ÄÜÔËÐеÄÓ¦ÓóÌÐò×ÜÊÇÎÞ·¨¹Ø±Õ ʾÀý 1 ÒÔϺ¯ÊýʹÓá°×Ô¶¯»¯¡±¹¦Äܵ÷Óà Excel µÄ Median () º¯Êý¡£Êý×Ö×éµÄÒ»°ëÔÚÖÐֵ֮ϣ¬¶øÁíÒ»°ëÔòÔÚÖÐÖµÖ®ÉÏ¡£ Sub xlMedian() Dim objExcel As Excel.Application Set objExcel = CreateObject("Excel.Application") MsgBox objExcel.Application.Median(1, 2, 5, 8, 12, 13) objExcel.Quit Set objExcel = Nothing End Sub ¸Ãº¯ÊýÔÚÏûÏ¢¿òÖÐÏÔʾ 6.5¡£ ʾÀý 2
ÒÔϺ¯ÊýʹÓá°×Ô¶¯»¯¡±¹¦Äܵ÷Óà Excel µÄ ChiInv () º¯Êý£¬¸Ãº¯Êý·µ»Ø¿¨·½·Ö²¼µÄµ¹Êý»òµ¥Î²¸ÅÂÊ¡£ Sub xlChiInv() Dim objExcel As Excel.Application Set objExcel = CreateObject("Excel.Application") MsgBox objExcel.Application.ChiInv(0.05, 10) objExcel.Quit Set objExcel = Nothing End Sub ¸Ãº¯ÊýÔÚÏûÏ¢¿òÖÐÏÔʾ 18.3070290368475¡£
ͨ¹ýÖ±½Óµ÷Óà Excel ÒýÓÿÉÒÔ¼ò»¯´úÂ룺 Sub xlChiInv() MsgBox Excel.Application.ChiInv(0.05, 10) End Sub ±¸×¢£º ʹÓøÃÓ﷨ʱ£¬Excel ½«±£ÁôÔÚÄÚ´æÖУ¬Ö±µ½ÖØÖôúÂë»ò¹Ø±ÕÊý¾Ý¿â¡£ ʹÓüÓÔØÏî Excel ҲʹÓüÓÔØÏî¡£ÕâЩ³ÌÐò°üº¬×Ô¶¨Ò庯ÊýºÍÃüÁî¡£Èç¹ûÐèҪʹÓðüº¬ÔÚ¼ÓÔØÏî³ÌÐòÖеĺ¯Êý£¬ÇëÏÈ´ò¿ª¼ÓÔØÏî¡£ÒÔÏÂʾÀýʹÓà LCM (Least Common Multiple) º¯Êý£º Sub xlAddin() Dim objExcel As Excel.Application Set objExcel = CreateObject("Excel.Application")
Opens the add-in, which is in the Analysis folder of the Excel Library Directory. objExcel.workbooks.Open (objExcel.Application.librarypath & _ "\Analysis\atpvbaen.xla") Runs the AutoOpen macro in the add-in objExcel.workbooks("atpvbaen.xla").RunAutoMacros (xlAutoOpen) MsgBox objExcel.Application.Run("atpvbaen.xla!lcm", 5, 2) objExcel.Quit Set objExcel = Nothing End Sub ¸Ãº¯ÊýÔÚÏûÏ¢¿òÖÐÏÔʾ 10¡£
--------------------------------------------------------------------------------
Ïà¹ØÎÄÕÂ
½« Microsoft Access ÓÃ×÷ Automation ·þÎñÆ÷ 2003-10-14 8:37:19
|