{"id":3067,"date":"2019-03-25T17:42:32","date_gmt":"2019-03-25T20:42:32","guid":{"rendered":"http:\/\/xexeu.elipse.com.br\/pt\/kb55769-abrindo-fechando-e-salvando-planilhas-do-excel-atraves-de-scripts\/"},"modified":"2019-07-02T14:36:12","modified_gmt":"2019-07-02T17:36:12","slug":"kb55769-abrindo-fechando-e-salvando-planilhas-do-excel-atraves-de-scripts","status":"publish","type":"post","link":"https:\/\/kb.elipse.com.br\/en\/kb55769-abrindo-fechando-e-salvando-planilhas-do-excel-atraves-de-scripts\/","title":{"rendered":"KB-55769: Abrindo, fechando e salvando planilhas do Excel atrav\u00e9s de scripts."},"content":{"rendered":"<div style=\"text-align: justify;\" align=\"justify\"><b>Descri\u00e7\u00e3o:<\/b><\/p>\n<p>Utilizando o Elipse SCADA, \u00e9 poss\u00edvel abrir, salvar e fechar um arquivo do Excel atrav\u00e9s de scripts?<\/p>\n<p><b>Solu\u00e7\u00e3o:<\/b><\/p>\n<p>Sim, isto \u00e9 poss\u00edvel atrav\u00e9s da fun\u00e7\u00e3o <i>ShellExecute <\/i>(encontrada atrav\u00e9s do AppBrowser dentro do Gerenciador Global).<\/p>\n<p>Para <u><b>abrir<\/b><\/u> a planilha:<br \/>\n<span style=\"font-family: Courier New;\">ShellExecute(&#8220;open&#8221;, &#8220;Book1.xls&#8221;, &#8220;&#8221;, &#8220;&#8221;,1 )<\/span><\/p>\n<p>Para <u><b>salvar<\/b><\/u> a planilha:<br \/>\n<span style=\"font-family: Courier New;\">DDEExecute(&#8220;Excel&#8221;,&#8221;Sheet1&#8243;,&#8221;[SAVE()]&#8221;)<\/span><\/p>\n<p>Para <u><b>fechar<\/b><\/u> somente a planilha:<br \/>\n<span style=\"font-family: Courier New;\">DDEExecute(&#8220;Excel&#8221;,&#8221;Sheet1&#8243;,&#8221;[CLOSE()]&#8221;) <\/span><\/p>\n<p>Para finalizar o processo, basta executar um software que fecha o programa aberto atrav\u00e9s de linha de comando, e com isto pode-se usar o comando <i>Execute <\/i>do Elipse SCADA.<\/p>\n<p>Exemplo:<br \/>\n<span style=\"font-family: Courier New;\">Execute(&#8220;C:\\PSTools\\pskill -t EXCEL.exe&#8221;)<\/span><\/p>\n<p>Neste exemplo, foi utilizado o software <b>PsKill<\/b>, uma ferramenta do sysinternals da Microsoft.<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Descri\u00e7\u00e3o: Utilizando o Elipse SCADA, \u00e9 poss\u00edvel abrir, salvar e fechar um arquivo do Excel atrav\u00e9s de scripts? Solu\u00e7\u00e3o: Sim, isto \u00e9 poss\u00edvel atrav\u00e9s da fun\u00e7\u00e3o ShellExecute (encontrada atrav\u00e9s do&hellip;<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0},"categories":[620,621],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v19.8 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>KB-55769: Abrindo, fechando e salvando planilhas do Excel atrav\u00e9s de scripts. - Elipse Knowledgebase<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/kb.elipse.com.br\/en\/kb55769-abrindo-fechando-e-salvando-planilhas-do-excel-atraves-de-scripts\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"KB-55769: Abrindo, fechando e salvando planilhas do Excel atrav\u00e9s de scripts.\" \/>\n<meta property=\"og:description\" content=\"Descri\u00e7\u00e3o: Utilizando o Elipse SCADA, \u00e9 poss\u00edvel abrir, salvar e fechar um arquivo do Excel atrav\u00e9s de scripts? Solu\u00e7\u00e3o: Sim, isto \u00e9 poss\u00edvel atrav\u00e9s da fun\u00e7\u00e3o ShellExecute (encontrada atrav\u00e9s do&hellip;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/kb.elipse.com.br\/en\/kb55769-abrindo-fechando-e-salvando-planilhas-do-excel-atraves-de-scripts\/\" \/>\n<meta property=\"og:site_name\" content=\"Elipse Knowledgebase\" \/>\n<meta property=\"article:publisher\" content=\"http:\/\/www.facebook.com\/elipsesoftware\" \/>\n<meta property=\"article:published_time\" content=\"2019-03-25T20:42:32+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-07-02T17:36:12+00:00\" \/>\n<meta name=\"author\" content=\"D\u00e9lio Damin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"D\u00e9lio Damin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/kb.elipse.com.br\/en\/kb55769-abrindo-fechando-e-salvando-planilhas-do-excel-atraves-de-scripts\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/kb.elipse.com.br\/en\/kb55769-abrindo-fechando-e-salvando-planilhas-do-excel-atraves-de-scripts\/\"},\"author\":{\"name\":\"D\u00e9lio Damin\",\"@id\":\"https:\/\/kb.elipse.com.br\/#\/schema\/person\/be597eff34b5f24af940a55332870778\"},\"headline\":\"KB-55769: Abrindo, fechando e salvando planilhas do Excel atrav\u00e9s de scripts.\",\"datePublished\":\"2019-03-25T20:42:32+00:00\",\"dateModified\":\"2019-07-02T17:36:12+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/kb.elipse.com.br\/en\/kb55769-abrindo-fechando-e-salvando-planilhas-do-excel-atraves-de-scripts\/\"},\"wordCount\":131,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/kb.elipse.com.br\/#organization\"},\"articleSection\":[\"Elipse Scada\",\"Scripts\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/kb.elipse.com.br\/en\/kb55769-abrindo-fechando-e-salvando-planilhas-do-excel-atraves-de-scripts\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/kb.elipse.com.br\/en\/kb55769-abrindo-fechando-e-salvando-planilhas-do-excel-atraves-de-scripts\/\",\"url\":\"https:\/\/kb.elipse.com.br\/en\/kb55769-abrindo-fechando-e-salvando-planilhas-do-excel-atraves-de-scripts\/\",\"name\":\"[:pt]KB-55769: Abrindo, fechando e salvando planilhas do Excel atrav\u00e9s de scripts.[:] - Elipse Knowledgebase\",\"isPartOf\":{\"@id\":\"https:\/\/kb.elipse.com.br\/#website\"},\"datePublished\":\"2019-03-25T20:42:32+00:00\",\"dateModified\":\"2019-07-02T17:36:12+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/kb.elipse.com.br\/en\/kb55769-abrindo-fechando-e-salvando-planilhas-do-excel-atraves-de-scripts\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/kb.elipse.com.br\/en\/kb55769-abrindo-fechando-e-salvando-planilhas-do-excel-atraves-de-scripts\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/kb.elipse.com.br\/en\/kb55769-abrindo-fechando-e-salvando-planilhas-do-excel-atraves-de-scripts\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"In\u00edcio\",\"item\":\"https:\/\/kb.elipse.com.br\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"KB-55769: Abrindo, fechando e salvando planilhas do Excel atrav\u00e9s de scripts.\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/kb.elipse.com.br\/#website\",\"url\":\"https:\/\/kb.elipse.com.br\/\",\"name\":\"Elipse Knowledgebase\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/kb.elipse.com.br\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/kb.elipse.com.br\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/kb.elipse.com.br\/#organization\",\"name\":\"Elipse Software\",\"url\":\"https:\/\/kb.elipse.com.br\/\",\"sameAs\":[\"http:\/\/www.facebook.com\/elipsesoftware\"],\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/kb.elipse.com.br\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/kb.elipse.com.br\/wp-content\/uploads\/2019\/05\/schererelipse-com-br\/logoElipse.png\",\"contentUrl\":\"https:\/\/kb.elipse.com.br\/wp-content\/uploads\/2019\/05\/schererelipse-com-br\/logoElipse.png\",\"width\":161,\"height\":58,\"caption\":\"Elipse Software\"},\"image\":{\"@id\":\"https:\/\/kb.elipse.com.br\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/kb.elipse.com.br\/#\/schema\/person\/be597eff34b5f24af940a55332870778\",\"name\":\"D\u00e9lio Damin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/kb.elipse.com.br\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/fdf251d36430f8dd22144c3f1bc53376?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/fdf251d36430f8dd22144c3f1bc53376?s=96&d=mm&r=g\",\"caption\":\"D\u00e9lio Damin\"},\"url\":\"https:\/\/kb.elipse.com.br\/en\/author\/delio\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"KB-55769: Abrindo, fechando e salvando planilhas do Excel atrav\u00e9s de scripts. - Elipse Knowledgebase","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/kb.elipse.com.br\/en\/kb55769-abrindo-fechando-e-salvando-planilhas-do-excel-atraves-de-scripts\/","og_locale":"en_US","og_type":"article","og_title":"[:pt]KB-55769: Abrindo, fechando e salvando planilhas do Excel atrav\u00e9s de scripts.[:] - Elipse Knowledgebase","og_description":"Descri\u00e7\u00e3o: Utilizando o Elipse SCADA, \u00e9 poss\u00edvel abrir, salvar e fechar um arquivo do Excel atrav\u00e9s de scripts? Solu\u00e7\u00e3o: Sim, isto \u00e9 poss\u00edvel atrav\u00e9s da fun\u00e7\u00e3o ShellExecute (encontrada atrav\u00e9s do&hellip;","og_url":"https:\/\/kb.elipse.com.br\/en\/kb55769-abrindo-fechando-e-salvando-planilhas-do-excel-atraves-de-scripts\/","og_site_name":"Elipse Knowledgebase","article_publisher":"http:\/\/www.facebook.com\/elipsesoftware","article_published_time":"2019-03-25T20:42:32+00:00","article_modified_time":"2019-07-02T17:36:12+00:00","author":"D\u00e9lio Damin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"D\u00e9lio Damin","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/kb.elipse.com.br\/en\/kb55769-abrindo-fechando-e-salvando-planilhas-do-excel-atraves-de-scripts\/#article","isPartOf":{"@id":"https:\/\/kb.elipse.com.br\/en\/kb55769-abrindo-fechando-e-salvando-planilhas-do-excel-atraves-de-scripts\/"},"author":{"name":"D\u00e9lio Damin","@id":"https:\/\/kb.elipse.com.br\/#\/schema\/person\/be597eff34b5f24af940a55332870778"},"headline":"KB-55769: Abrindo, fechando e salvando planilhas do Excel atrav\u00e9s de scripts.","datePublished":"2019-03-25T20:42:32+00:00","dateModified":"2019-07-02T17:36:12+00:00","mainEntityOfPage":{"@id":"https:\/\/kb.elipse.com.br\/en\/kb55769-abrindo-fechando-e-salvando-planilhas-do-excel-atraves-de-scripts\/"},"wordCount":131,"commentCount":0,"publisher":{"@id":"https:\/\/kb.elipse.com.br\/#organization"},"articleSection":["Elipse Scada","Scripts"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/kb.elipse.com.br\/en\/kb55769-abrindo-fechando-e-salvando-planilhas-do-excel-atraves-de-scripts\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/kb.elipse.com.br\/en\/kb55769-abrindo-fechando-e-salvando-planilhas-do-excel-atraves-de-scripts\/","url":"https:\/\/kb.elipse.com.br\/en\/kb55769-abrindo-fechando-e-salvando-planilhas-do-excel-atraves-de-scripts\/","name":"[:pt]KB-55769: Abrindo, fechando e salvando planilhas do Excel atrav\u00e9s de scripts.[:] - Elipse Knowledgebase","isPartOf":{"@id":"https:\/\/kb.elipse.com.br\/#website"},"datePublished":"2019-03-25T20:42:32+00:00","dateModified":"2019-07-02T17:36:12+00:00","breadcrumb":{"@id":"https:\/\/kb.elipse.com.br\/en\/kb55769-abrindo-fechando-e-salvando-planilhas-do-excel-atraves-de-scripts\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/kb.elipse.com.br\/en\/kb55769-abrindo-fechando-e-salvando-planilhas-do-excel-atraves-de-scripts\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/kb.elipse.com.br\/en\/kb55769-abrindo-fechando-e-salvando-planilhas-do-excel-atraves-de-scripts\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"In\u00edcio","item":"https:\/\/kb.elipse.com.br\/en\/"},{"@type":"ListItem","position":2,"name":"KB-55769: Abrindo, fechando e salvando planilhas do Excel atrav\u00e9s de scripts."}]},{"@type":"WebSite","@id":"https:\/\/kb.elipse.com.br\/#website","url":"https:\/\/kb.elipse.com.br\/","name":"Elipse Knowledgebase","description":"","publisher":{"@id":"https:\/\/kb.elipse.com.br\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/kb.elipse.com.br\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/kb.elipse.com.br\/#organization","name":"Elipse Software","url":"https:\/\/kb.elipse.com.br\/","sameAs":["http:\/\/www.facebook.com\/elipsesoftware"],"logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/kb.elipse.com.br\/#\/schema\/logo\/image\/","url":"https:\/\/kb.elipse.com.br\/wp-content\/uploads\/2019\/05\/schererelipse-com-br\/logoElipse.png","contentUrl":"https:\/\/kb.elipse.com.br\/wp-content\/uploads\/2019\/05\/schererelipse-com-br\/logoElipse.png","width":161,"height":58,"caption":"Elipse Software"},"image":{"@id":"https:\/\/kb.elipse.com.br\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/kb.elipse.com.br\/#\/schema\/person\/be597eff34b5f24af940a55332870778","name":"D\u00e9lio Damin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/kb.elipse.com.br\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/fdf251d36430f8dd22144c3f1bc53376?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/fdf251d36430f8dd22144c3f1bc53376?s=96&d=mm&r=g","caption":"D\u00e9lio Damin"},"url":"https:\/\/kb.elipse.com.br\/en\/author\/delio\/"}]}},"_links":{"self":[{"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/posts\/3067"}],"collection":[{"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/comments?post=3067"}],"version-history":[{"count":3,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/posts\/3067\/revisions"}],"predecessor-version":[{"id":7354,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/posts\/3067\/revisions\/7354"}],"wp:attachment":[{"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/media?parent=3067"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/categories?post=3067"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/tags?post=3067"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}