{"id":152,"date":"2019-05-02T11:48:04","date_gmt":"2019-05-02T03:48:04","guid":{"rendered":"http:\/\/www.hefeiyu.com\/?p=152"},"modified":"2019-05-02T11:50:29","modified_gmt":"2019-05-02T03:50:29","slug":"top-gp-excel%e8%b0%83%e7%94%a8wincom%e8%af%a6%e8%a7%a3","status":"publish","type":"post","link":"https:\/\/www.hefeiyu.com\/?p=152","title":{"rendered":"TOP GP EXCEL\u5bfc\u5165\u5bfc\u51fa\u8c03\u7528wincom\u8be6\u89e3"},"content":{"rendered":"<p>\u76f8\u4fe1\u8bb8\u591a\u516c\u53f8\u867d\u7136\u7528\u4e0a\u4e86tiptop erp\u7cfb\u7edf\uff0c\u4f46\u662fExcel\u5728\u8868\u683c\u5236\u4f5c\u6216\u8005\u6570\u636e\u5206\u6790\u65b9\u9762\u4ecd\u7136\u8d77\u7740\u4e3e\u8db3\u8f7b\u91cd\u7684\u4f5c\u7528\u3002\u9f0e\u65b0\u6709\u81ea\u5df1\u7684\u4ea7\u751fexcel\u6587\u4ef6\u7684\u65b9\u5f0f\uff0c\u5c31\u662f\u4ea7\u751fxml\u683c\u5f0f\u7684excel\u6587\u4ef6\uff0c\u8fd9\u79cd\u65b9\u5f0f\u590d\u6742\uff0c\u4e0d\u76f4\u89c2\uff0c\u800c\u4e14\u683c\u5f0f\u4e5f\u4e0d\u662f\u5fae\u8f6f\u9ed8\u8ba4\u7684\u4e8c\u8fdb\u5236\u683c\u5f0f\u7684\u6587\u4ef6\uff0c\u8981\u4eceexcel\u6587\u4ef6\u4e2d\u5bfc\u5165\u6570\u636e\u5230tiptop\u6570\u636e\u5e93\u4e2d\u5c31\u66f4\u65e0\u4ece\u8c08\u8d77\u3002<br \/>\n\u90a3\u4e48\u6709\u6ca1\u6709\u5176\u4ed6\u7684\u529e\u6cd5\u5462\uff1f<br \/>\n\u7ecf\u8fc7\u7b14\u8005\u5bf9GDC\u7684\u5206\u6790\u5e76\u4e14\u53c2\u8003\u4e864js\u5b98\u65b9\u63d0\u4f9b\u7684GDC\u624b\u518c\uff0c\u627e\u5230\u4e86\u5b9e\u73b0\u7684\u65b9\u6cd5\u3002\u901a\u5e38\u5728\u5176\u4ed6\u5f00\u53d1\u5de5\u5177\u4e2d(\u4f8b\u5982VB,Delphi)\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528COM\u7684\u65b9\u5f0f\u6765\u8ddfexcel application\u8fdb\u884c\u901a\u8baf\uff0c\u90a3\u4e48\uff0cGDC\u4e5f\u662f\u900f\u8fc7\u540c\u6837\u7684\u65b9\u5f0f\u6765\u5b9e\u73b0\u3002<br \/>\n\u56e0\u4e3aGDC\u662f\u4e00\u4e2a\u5ba2\u6237\u7aef\u7684\u5de5\u5177\uff0c\u6240\u4ee5\u5b9e\u73b0COM\u5b8c\u5168\u6ca1\u6709\u95ee\u9898\u3002\u5b83\u901a\u8fc7ui,interface.frontcall()\u8fd9\u4e2a\u51fd\u6570\u6765\u5b9e\u73b0,\u6b64\u51fd\u6570\u6709\u4ee5\u4e0b\u7684\u51e0\u79cd\u8c03\u7528\u65b9\u6cd5\uff1a<br \/>\n1:CALL ui.interface.frontcall(&#8220;WinCOM&#8221;,&#8221;CreateInstance&#8221;,[program],[handle] \u00a0 ##\u521b\u5efaCOM\u5b9e\u4f8b<br \/>\n1.program\u53c2\u6570\u662f\u5728\u7cfb\u7edf\u4e2d\u6ce8\u518c\u7684COM\u5bf9\u8c61\u7684\u7c7b\u540d\u3002<br \/>\n2.handle\u662f\u4e00\u4e2a\u6574\u578b\u53d8\u91cf\uff0c\u7528\u6765\u63a5\u6536\u51fd\u6570\u8fd4\u56de\u7684\u72b6\u6001\u503c\u3002<br \/>\n3.\u5982\u679c\u51fd\u6570\u8c03\u7528\u65f6\u4ea7\u751f\u9519\u8bef\uff0c\u5219handle\u8fd4\u56de-1\uff0c\u5982\u679c\u6ca1\u6709\u9519\u8bef\uff0c\u5219\u6b64\u503c\u53ef\u4ee5\u5728\u540e\u7eed\u7684API\u51fd\u6570\u4e2d\u4f7f\u7528\u3002<br \/>\n2:CALL ui.interface.frontcall(&#8220;WinCOM&#8221;,&#8221;CallMethod&#8221;,[handle,method,arg1,&#8230;],[result]) OR [handle,method(arg1,&#8230;)],[result]) \u00a0#\u8c03\u7528\u5bf9\u8c61\u6307\u5b9a\u7684\u65b9\u6cd5<br \/>\n1.handle\u662f\u5176\u4ed6\u524d\u7aef\u8c03\u7528\u51fd\u6570\u8fd4\u56de\u7684\u53e5\u67c4(\u6bd4\u5982\uff1aCreateInstance,CallMethod,GetProperty)\u3002<br \/>\n2.method\u662f\u8c03\u7528\u7684\u51fd\u6570\u540d\u5b57\u3002<br \/>\n3.arg1&#8230;\u8fd9\u4e9b\u662f\u4f20\u9012\u7ed9\u6b64\u65b9\u6cd5\u7684\u53c2\u6570\uff0c\u5bf9\u4e8e\u6211\u4eec\u672c\u6587\u8bf4\u7684excel\u6765\u8bf4\uff0c\u53ef\u4ee5\u7528\u5b8f\u7684\u65b9\u5f0f\u6765\u786e\u5b9a\u53c2\u6570\u662f\u5426\u6b63\u786e\uff0c\u8fd9\u4e2a\u540e\u9762\u8fd8\u4f1a\u8ff0\u53ca\u3002<br \/>\n4.result\u662f\u4e00\u4e2a\u8fd4\u56de\u503c\uff0c\u5982\u679c\u503c\u4e3a-1,\u8868\u793a\u6709\u9519\u8bef\u3002<br \/>\n3.CALL ui.interface.frontcall(&#8220;WinCOM&#8221;,&#8221;GetProperty&#8221;,[Handle,member],[result] \u00a0 #\u83b7\u5f97\u5c5e\u6027<br \/>\n1.handle\u610f\u4e49\u540c\u4e0a\u3002<br \/>\n2.member\u662f\u8981\u83b7\u5f97\u7684\u5c5e\u6027\u7684\u540d\u5b57\u3002<br \/>\n3.result\u610f\u4e49\u540c\u4e0a\u3002<br \/>\n4.CALL ui.interface.frontcall(&#8220;WinCOM&#8221;,&#8221;SetProperty&#8221;,[handle,member,value],[result] \u00a0#\u8bbe\u7f6e\u5c5e\u6027<br \/>\n1.handle\u610f\u4e49\u540c\u4e0a\u3002<br \/>\n2.member\u662f\u8981\u8bbe\u7f6e\u7684\u5c5e\u6027\u7684\u540d\u5b57\u3002<br \/>\n3.value\u662f\u5c5e\u6027\u7684\u503c\u3002<br \/>\n4.result\u610f\u4e49\u540c\u4e0a\u3002<br \/>\n5.CALL ui.interface.frontcall(&#8220;WinCOM&#8221;,&#8221;GetError&#8221;,[],[result] \u00a0 #\u83b7\u53d6\u9519\u8bef\u4fe1\u606f<br \/>\n1.result\u662f\u6700\u540e\u4e00\u6b21\u9519\u8bef\u7684\u63cf\u8ff0\u3002<br \/>\n2.\u5982\u679c\u6ca1\u6709\u9519\u8bef\uff0c\u5219\u8fd4\u56deNULL\u503c\u3002<br \/>\n6.CALL ui.interface.frontcall(&#8220;WinCOM&#8221;,&#8221;ReleaseInstance&#8221;,[handle],[result])<br \/>\n1.handle\u610f\u4e49\u540c\u4e0a\u3002<br \/>\n2.result\u4e3a-1\u8868\u793a\u8c03\u7528\u6709\u9519\u8bef\uff0c\u6ca1\u6709\u9519\u8bef\u65f6\uff0c\u5176\u503c\u4e3a0\u3002<br \/>\n\u7b80\u5355\u4ecb\u7ecd\u5b8c\u4ee5\u4e0a\u7684\u51fd\u6570\u4e4b\u540e\uff0c\u6211\u4eec\u4ee5\u4e00\u4e2a\u4f8b\u5b50\u6765\u8bf4\u660e\uff0c\u8fd9\u4e9b\u51fd\u6570\u7684\u7528\u6cd5\uff0c\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n<pre class=\"pure-highlightjs\"><code class=\"null\">define xlapp \u00a0 \u00a0integer\r\ndefine xlwb \u00a0 \u00a0 integer\r\nmain\r\n\u00a0 define result \u00a0 \u00a0integer\r\n\u00a0 define str \u00a0 \u00a0 \u00a0 string\r\n\u00a0 define filename \u00a0string\r\n\u00a0\u00a0\r\n\u00a0 let xlapp = -1\r\n\u00a0 let xlwb = -1\r\n\u00a0\u00a0\r\n\u00a0 ##### \u00a0\u521b\u5efaexcel\u5b9e\u4f8b \u00a0#####\r\n\u00a0 call ui.interface.frontcall(\"WinCOM\",\"CreateInstance\",[\"Excel.Application\"],[xlapp])\r\n\u00a0 call checkError(xlapp,__LINE__)\r\n\u00a0\u00a0\r\n\u00a0 ##### \u00a0\u65b0\u5efaexcel\u6587\u4ef6\u6216\u8005\u6253\u5f00\u73b0\u6709\u7684excel\u6587\u4ef6 \u00a0#####\r\n\u00a0 --call ui.interface.frontcall(\"WinCOM\",\"CallMethod\",[xlapp,\"WorkBooks.Add\"],[xlwb]) \u00a0#\u65b0\u5efa\r\n\u00a0 let filename=\"c:\\\\temp\\\\test.xls\"\r\n\u00a0 call ui.interface.frontcall(\"WinCOM\",\"CallMethod\",[xlapp,\"WorkBooks.Open\",filename],[xlwb]) \u00a0#\u6253\u5f00\u539f\u6765\u7684\r\n\u00a0 call checkError(xlwb,__LINE__)\r\n\u00a0\u00a0\r\n\u00a0 ##### \u00a0\u4f7fexcel\u5b9e\u4f8b\u53ef\u89c1 \u00a0#####\r\n\u00a0 call ui.interface.frontcall(\"WinCOM\",\"SetProperty\",[xlapp,\"Visible\",true],[result])\r\n\u00a0 call checkError(result,__LINE__)\r\n\r\n\r\n\u00a0 ##### \u00a0\u8bbe\u5b9asheet2\u4e3a\u5f53\u524d\u7684sheet \u00a0#####\r\n\u00a0 call ui.interface.frontcall(\"WinCOM\",\"CallMethod\",[xlwb,'Sheets(\"Sheet2\").Select'],[result])\r\n\u00a0 call checkError(result,__LINE__)\r\n\r\n\r\n\u00a0 ##### \u00a0\u663e\u793a\u683c\u7ebf \u00a0#####\r\n\u00a0 call ui.interface.frontcall(\"WinCOM\",\"SetProperty\",[xlapp,\"ActiveWindow.DisplayGridlines\",false],[result])\r\n\u00a0 call checkError(result,__LINE__)\r\n\r\n\r\n\u00a0 ##### \u00a0\u586b\u5145\u5355\u5143\u683c\u6570\u636e \u00a0#####\r\n\u00a0 call ui.interface.frontcall(\"WinCOM\",\"SetProperty\",[xlwb,'activesheet.Range(\"B2\").Value',\"\u4e2d\u56fd\u4eba\u6c11\"],[result])\r\n\u00a0 call checkError(result,__LINE__)\r\n\r\n\r\n\u00a0 call ui.interface.frontcall(\"WinCOM\",\"SetProperty\",[xlwb,'activesheet.Cells(3,2).Value',\"\u65b9\u6cd51\"],[result])\r\n\u00a0 call checkError(result,__LINE__)\r\n\r\n\r\n\u00a0 call ui.interface.frontcall(\"WinCOM\",\"SetProperty\",[xlwb,'activesheet.Cells(4,2).Value',\"\u65b9\u6cd52\"],[result])\r\n\u00a0 call checkError(result,__LINE__)\r\n\u00a0\u00a0\r\n\u00a0 ##### \u00a0\u5355\u5143\u683c\u753b\u7ebf \u00a0#####\r\n\u00a0 call ui.interface.frontcall(\"WinCOM\",\"SetProperty\",[xlwb,'activesheet.Range(\"B2:B4\").Borders(7).LineStyle',1],[result]) \u00a0 #\u5de6\u8fb9\r\n\u00a0 call checkError(result,__LINE__)\r\n\u00a0 call ui.interface.frontcall(\"WinCOM\",\"SetProperty\",[xlwb,'activesheet.Range(\"B2:B4\").Borders(7).Weight',-4138],[result]) \u00a0#\u5de6\u8fb9\r\n\u00a0 call checkError(result,__LINE__)\r\n\r\n\r\n\u00a0 call ui.interface.frontcall(\"WinCOM\",\"SetProperty\",[xlwb,'activesheet.Range(\"B2:B4\").Borders(8).LineStyle',1],[result]) \u00a0 #\u4e0a\u8fb9\r\n\u00a0 call checkError(result,__LINE__)\r\n\u00a0 call ui.interface.frontcall(\"WinCOM\",\"SetProperty\",[xlwb,'activesheet.Range(\"B2:B4\").Borders(8).Weight',-4138],[result]) \u00a0#\u4e0a\u8fb9\r\n\u00a0 call checkError(result,__LINE__)\r\n\u00a0\u00a0\r\n\u00a0 call ui.interface.frontcall(\"WinCOM\",\"SetProperty\",[xlwb,'activesheet.Range(\"B2:B4\").Borders(9).LineStyle',1],[result]) \u00a0 #\u4e0b\u8fb9\r\n\u00a0 call checkError(result,__LINE__)\r\n\u00a0 call ui.interface.frontcall(\"WinCOM\",\"SetProperty\",[xlwb,'activesheet.Range(\"B2:B4\").Borders(9).Weight',-4138],[result]) \u00a0#\u4e0b\u8fb9\r\n\u00a0 call checkError(result,__LINE__)\r\n\u00a0\u00a0\r\n\u00a0 call ui.interface.frontcall(\"WinCOM\",\"SetProperty\",[xlwb,'activesheet.Range(\"B2:B4\").Borders(10).LineStyle',1],[result]) \u00a0 #\u4e0b\u8fb9\r\n\u00a0 call checkError(result,__LINE__)\r\n\u00a0 call ui.interface.frontcall(\"WinCOM\",\"SetProperty\",[xlwb,'activesheet.Range(\"B2:B4\").Borders(10).Weight',-4138],[result]) \u00a0#\u4e0b\u8fb9\r\n\u00a0 call checkError(result,__LINE__)\r\n\u00a0\u00a0\r\n\u00a0 call ui.interface.frontcall(\"WinCOM\",\"SetProperty\",[xlwb,'activesheet.Range(\"B2:B4\").Borders(12).LineStyle',1],[result]) \u00a0 #\u5185\u90e8\u6c34\u5e73\u7ebf\r\n\u00a0 call checkError(result,__LINE__)\r\n\u00a0 call ui.interface.frontcall(\"WinCOM\",\"SetProperty\",[xlwb,'activesheet.Range(\"B2:B4\").Borders(12).Weight',2],[result]) \u00a0 \u00a0 \u00a0#\u5185\u90e8\u6c34\u5e73\u7ebf\r\n\u00a0 call checkError(result,__LINE__)\r\n\u00a0\u00a0\r\n\u00a0 ##### \u00a0\u5355\u5143\u683c\u5408\u5e76 \u00a0#####\r\n\u00a0 call ui.interface.frontcall(\"WinCOM\",\"SetProperty\",[xlwb,'activesheet.Range(\"D2\").Value',\"\u6b64\u5904\u4e3a\u5408\u5e76\u5355\u5143\u683c\"],[result])\r\n\u00a0 call checkError(result,__LINE__)\r\n\u00a0 call ui.interface.frontcall(\"WinCOM\",\"SetProperty\",[xlwb,'activesheet.Range(\"D2:F5\").HorizontalAlignment',-4108],[result])\r\n\u00a0 call checkError(result,__LINE__)\r\n\u00a0 call ui.interface.frontcall(\"WinCOM\",\"SetProperty\",[xlwb,'activesheet.Range(\"D2:F5\").VerticalAlignment',-4108],[result])\r\n\u00a0 call checkError(result,__LINE__)\r\n\u00a0 call ui.interface.frontcall(\"WinCOM\",\"SetProperty\",[xlwb,'activesheet.Range(\"D2:F5\").MergeCells',true],[result])\r\n\u00a0 call checkError(result,__LINE__)\r\n\u00a0\u00a0\r\n\u00a0 ##### \u00a0\u8bbe\u7f6e\u5217\u5bbd \u00a0#####\r\n\u00a0 call ui.interface.frontcall(\"WinCOM\",\"SetProperty\",[xlwb,'activesheet.Columns(\"E:E\").ColumnWidth',15],[result])\r\n\u00a0 call checkError(result,__LINE__)\r\n\u00a0\u00a0\r\n\u00a0 ##### \u00a0\u8bbe\u7f6e\u884c\u9ad8 \u00a0#####\r\n\u00a0 call ui.interface.frontcall(\"WinCOM\",\"SetProperty\",[xlwb,'activesheet.Rows(\"1:1\").RowHeight',25],[result])\r\n\u00a0 call checkError(result,__LINE__)\r\n\u00a0\u00a0\r\n\u00a0 ##### \u00a0\u83b7\u53d6\u5355\u5143\u683c\u7684\u503c \u00a0#####\r\n\u00a0 call ui.interface.frontcall(\"WinCOM\",\"GetProperty\",[xlwb,'activesheet.Range(\"A1\").Value'],[str])\r\n\u00a0 call checkError(str,__LINE__)\r\n\u00a0 display \"content of the cell is :\" || str\r\n\u00a0\u00a0\r\n\u00a0 ##### \u00a0\u83b7\u53d6\u884c\u6570 \u00a0#####\r\n\u00a0 call ui.interface.frontcall(\"WinCOM\",\"GetProperty\",[xlwb,'activesheet.UsedRange.Rows.Count'],[result])\r\n\u00a0 call checkError(result,__LINE__)\r\n\u00a0 display \"Total Used Rows is :\" || result\r\n\u00a0\u00a0\r\n\u00a0 ##### \u00a0\u83b7\u53d6\u5217\u6570 \u00a0#####\r\n\u00a0 call ui.interface.frontcall(\"WinCOM\",\"GetProperty\",[xlwb,'activesheet.UsedRange.Columns.Count'],[result])\r\n\u00a0 call checkError(result,__LINE__)\r\n\u00a0 display \"Total Used Cols is :\" || result\r\n\u00a0\u00a0\r\n\u00a0 call freeMemory()\r\nend main\r\n\r\n\r\nfunction freeMemory()\r\n\u00a0 define res \u00a0integer\r\n\u00a0\u00a0\r\n\u00a0 if xlwb != -1 then\r\n\u00a0 \u00a0 call ui.interface.frontcall(\"WinCOM\",\"ReleaseInstance\",[xlwb],[res])\r\n\u00a0 end if\r\n\u00a0\u00a0\r\n\u00a0 if xlapp != -1 then\r\n\u00a0 \u00a0 #call ui.interface.frontcall(\"WinCOM\",'CallMethod',[xlapp,'Quit'],[res]) \u00a0#\u9000\u51fa\r\n\u00a0 \u00a0 call ui.interface.frontcall(\"WinCOM\",\"ReleaseInstance\",[xlapp],[res])\r\n\u00a0 end if\r\nend function\r\n\r\n\r\nfunction checkError(res,lin)\r\n\u00a0 define res \u00a0 \u00a0 integer\r\n\u00a0 define lin \u00a0 \u00a0 integer\r\n\u00a0 define mess \u00a0 \u00a0string\r\n\u00a0\u00a0\r\n\u00a0 if res = -1 then\r\n\u00a0 \u00a0 display \"COM Error for call at line:\", lin\r\n\u00a0 \u00a0 call ui.interface.frontcall(\"WinCOM\",\"GetError\",[],[mess])\r\n\u00a0 \u00a0 display mess\r\n\u00a0\u00a0\r\n\u00a0 \u00a0 call freeMemory()\r\n\u00a0 \u00a0 display \"Exit with COM Error.\"\r\n\u00a0 \u00a0 exit program (-1)\r\n\u00a0 end if\r\nend function<\/code><\/pre>\n<p>\u4ee5\u4e0a\u4ee3\u7801\u53ea\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u4f8b\u5b50\uff0c\u629b\u7816\u5f15\u7389\u800c\u5df2\uff0c\u4f60\u53ef\u4ee5\u5c06\u5176\u6269\u5145\u4e00\u4e0b\uff0c\u4f7f\u5176\u53ef\u4ee5\u5bfc\u51fatiptop erp\u7684\u4e1a\u52a1\u6570\u636e\uff0c\u800c\u4e14\u53ef\u4ee5\u52a0\u5165\u4e1a\u52a1\u903b\u8f91\uff0c\u4f7fexcel\u4f5c\u4e3a\u4e00\u4e2a\u62a5\u8868\u5de5\u5177\uff1b\u6216\u8005\u628aexcel\u7684\u6570\u636e\u5bfc\u5165tiptop\u4e2d\u505a\u8fdb\u4e00\u6b65\u7684\u5206\u6790\uff0c\u51cf\u5c11\u7528\u6237\u8f93\u5165\u7684\u65f6\u95f4\u3002<br \/>\n\u5728\u63a7\u5236excel\u7684\u65f6\u5019\uff0c\u6709\u4ee5\u4e0b\u7684\u8bf4\u660e\u4f9b\u53c2\u8003\uff1a<br \/>\n1.\u5982\u4f55\u77e5\u9053property\u7684\u8bed\u6cd5\uff1f<br \/>\n\u6709\u4e2a\u7b80\u5355\u7684\u529e\u6cd5\uff0c\u6253\u5f00\u4e00\u4e2aexcel\u6587\u4ef6\uff0c\u9009\u62e9\u5f55\u5236\u5b8f\uff0c\u7136\u540e\u505a\u76f8\u5e94\u7684\u64cd\u4f5c\uff0c\u7136\u540e\u7ed3\u675f\u5f55\u5236\uff0c\u67e5\u770b\u5b8f\u4ee3\u7801\uff0c\u8fd9\u91cc\u7684\u4ee3\u7801\u867d\u7136\u662fVBA\u7684\uff0c\u4f46\u662f\u62ff\u6765\u53c2\u8003\u57fa\u672c\u4e0a\u6ca1\u6709\u95ee\u9898\u7684\u3002<br \/>\n2.VBA\u4ee3\u7801\u4e2d\u7684\u5e38\u91cf(\u6bd4\u5982:xlThin,xlMedium\u7b49)\uff0c\u5728BDL\u4ee3\u7801\u4e2d\u4e0d\u8ba4\u8bc6\u600e\u4e48\u529e\uff1f<br \/>\n\u53ef\u4ee5\u53bb\u7f51\u4e0a\u67e5\uff0c\u95ee\u95ee\u8c37\u54e5\u6216\u8005\u5ea6\u5a18\uff0c\u4ed6\u4eec\u4e00\u5b9a\u4f1a\u544a\u8bc9\u4f60\u7684\u3002<br \/>\n\u6216\u8005\u4e5f\u53ef\u4ee5\u6765\u95ee\u6211\uff0c\u6211\u6709\u5b8c\u6574\u7684\u6587\u6863\u3002(\u6211\u7684\u662fborland\u5de5\u7a0b\u5e08\u6574\u7406\u7684\uff0c\u539f\u672c\u662f\u7528\u5728delphi\u4e2d\u7684),\u5982\u679c\u7528\u7684\u7279\u522b\u591a\u7684\uff0c\u4e5f\u53ef\u4ee5\u628a\u8fd9\u4e9b\u5e38\u91cf\u653e\u5728\u4e00\u4e2a4gl\u6587\u4ef6\u4e2d\uff0c\u4f5c\u4e3aglobal\u7684\u65b9\u5f0f\u4f7f\u7528\u5728\u4ee3\u7801\u4e2d\uff0c\u8fd9\u6837\u5c31\u6bd4\u8f83\u65b9\u4fbf\u4e86\u3002\u6bd4\u5982\u4e0a\u4f8b\u4e2d\u7684activesheet.Range(&#8220;B2:B4&#8221;).Borders(10),\u4e3a\u4ec0\u4e48\u662f10\u5462\uff1f\u8fd9\u4e2a\u5c31\u662fVBA\u4ee3\u7801\u4e2d\u7ffb\u8bd1\u8fc7\u6765\u7684\u3002<\/p>\n<p>\u8f6c\u8f7d\u8bf7\u6ce8\u660e\uff1a<a href=\"https:\/\/www.hefeiyu.com\">\u8d6b\u975e\u57df<\/a> &raquo; <a href=\"https:\/\/www.hefeiyu.com\/?p=152\">TOP GP EXCEL\u5bfc\u5165\u5bfc\u51fa\u8c03\u7528wincom\u8be6\u89e3<\/a><\/p>","protected":false},"excerpt":{"rendered":"<p>\u76f8\u4fe1\u8bb8\u591a\u516c\u53f8\u867d\u7136\u7528\u4e0a\u4e86tiptop erp\u7cfb\u7edf\uff0c\u4f46\u662fExcel\u5728\u8868\u683c\u5236\u4f5c\u6216\u8005\u6570\u636e\u5206\u6790\u65b9\u9762\u4ecd\u7136\u8d77\u7740\u4e3e\u8db3\u8f7b\u91cd\u7684\u4f5c\u7528\u3002\u9f0e\u65b0\u6709\u81ea\u5df1\u7684\u4ea7\u751fexcel\u6587\u4ef6\u7684\u65b9\u5f0f\uff0c\u5c31\u662f\u4ea7\u751fxml\u683c\u5f0f\u7684excel\u6587\u4ef6\uff0c\u8fd9\u79cd\u65b9\u5f0f\u590d\u6742\uff0c\u4e0d\u76f4\u89c2\uff0c\u800c\u4e14\u683c\u5f0f\u4e5f\u4e0d\u662f\u5fae\u8f6f\u9ed8\u8ba4\u7684\u4e8c\u8fdb\u5236\u683c\u5f0f\u7684\u6587\u4ef6\uff0c [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26],"tags":[67],"class_list":["post-152","post","type-post","status-publish","format-standard","hentry","category-4gl","tag-excel"],"_links":{"self":[{"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=\/wp\/v2\/posts\/152","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=152"}],"version-history":[{"count":0,"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=\/wp\/v2\/posts\/152\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=152"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=152"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=152"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}