{"id":638,"date":"2024-06-13T09:18:22","date_gmt":"2024-06-13T01:18:22","guid":{"rendered":"http:\/\/www.wyrcad.com\/?p=638"},"modified":"2024-06-17T16:35:23","modified_gmt":"2024-06-17T08:35:23","slug":"%e7%bb%91%e5%ae%9a-excel-%e5%af%b9%e8%b1%a1","status":"publish","type":"post","link":"https:\/\/www.wyrcad.com\/?p=638","title":{"rendered":"\u7ed1\u5b9a Microsoft Excel \u5bf9\u8c61"},"content":{"rendered":"\n<p>\u6a21\u5757 BindExcel \u540e\u671f\u7ed1\u5b9a Microsoft Excel \u5bf9\u8c61\uff0c\u8c03\u7528\u65b9\u6cd5\u5982\u4e0b\uff1a<\/p>\n\n\n\n<p>Dim sProg As String<br>sProg = &#8220;Excel&#8221;<br>Dim oExcel As Object<br>Call BindExcel(True)<\/p>\n\n\n\n<p>Public Sub BindExcel(ByVal bVisible As Boolean)<br>If Not oExcel Is Nothing Then Exit Sub<br>On Error Resume Next<br>Set oExcel = GetObject(, sProg &amp; &#8220;.Application&#8221;)<br>If Err.Number &lt;&gt; 0 Then &#8216;\u6ca1\u6709\u6253\u5f00<br>Err.Clear<br>Set oExcel = CreateObject(sProg &amp; &#8220;.application&#8221;)<br>If Err.Number &lt;&gt; 0 Then &#8216;\u6ca1\u6709\u6b63\u786e\u5b89\u88c5<br>Err.Clear<br>Exit Sub<br>End If<br>oExcel.Visible = bVisible<br>End If<br>On Error GoTo 0<br>End Sub<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6a21\u5757 BindExcel \u540e\u671f\u7ed1\u5b9a Microsoft Excel \u5bf9\u8c61\uff0c\u8c03\u7528\u65b9\u6cd5\u5982\u4e0b\uff1a Dim sProg  &hellip; <a href=\"https:\/\/www.wyrcad.com\/?p=638\" class=\"more-link\">\u7ee7\u7eed\u9605\u8bfb<span class=\"screen-reader-text\">\u201c\u7ed1\u5b9a Microsoft Excel \u5bf9\u8c61\u201d<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[24,17],"class_list":["post-638","post","type-post","status-publish","format-standard","hentry","category-bianchengyuandi","tag-vb","tag-biancheng"],"_links":{"self":[{"href":"https:\/\/www.wyrcad.com\/index.php?rest_route=\/wp\/v2\/posts\/638","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wyrcad.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wyrcad.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wyrcad.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wyrcad.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=638"}],"version-history":[{"count":6,"href":"https:\/\/www.wyrcad.com\/index.php?rest_route=\/wp\/v2\/posts\/638\/revisions"}],"predecessor-version":[{"id":666,"href":"https:\/\/www.wyrcad.com\/index.php?rest_route=\/wp\/v2\/posts\/638\/revisions\/666"}],"wp:attachment":[{"href":"https:\/\/www.wyrcad.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=638"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wyrcad.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=638"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wyrcad.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=638"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}