{"id":1954,"date":"2015-01-31T18:32:56","date_gmt":"2015-01-31T17:32:56","guid":{"rendered":"http:\/\/www.itidea.nl\/?p=1954"},"modified":"2015-02-01T18:44:37","modified_gmt":"2015-02-01T17:44:37","slug":"quick-tip-exporting-a-webpart","status":"publish","type":"post","link":"https:\/\/www.itidea.nl\/index.php\/quick-tip-exporting-a-webpart\/","title":{"rendered":"Quick tip exporting a webpart"},"content":{"rendered":"<p>Some webparts can&#8217;t be exported by the UI to get the XML representation of it.<\/p>\n<p>Listview webparts are one of them. To get the XML anyway there are three\u00a0options to do so:<\/p>\n<ol type=\"1\">\n<li value=\"1\">Use javascript from the Export option<\/li>\n<li>Use the exportwp page directly<\/li>\n<li>Enable the Export functionality<\/li>\n<\/ol>\n<h4>Javascript<\/h4>\n<p>For listview webparts the Export option is present, although not visible. Inline style &#8216;display:none;&#8217; prevents showing the Export option, but it can be found using the browser&#8217;s developer tools.<br \/>\n<a href=\"https:\/\/www.itidea.nl\/wp-content\/uploads\/2015\/02\/ExportWPJavascriptInlineStyle_Id.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1956 size-large\" src=\"https:\/\/www.itidea.nl\/wp-content\/uploads\/2015\/02\/ExportWPJavascriptInlineStyle_Id-1024x76.png\" alt=\"ExportWPJavascriptInlineStyle_Id\" width=\"598\" height=\"44\" srcset=\"https:\/\/www.itidea.nl\/wp-content\/uploads\/2015\/02\/ExportWPJavascriptInlineStyle_Id-1024x76.png 1024w, https:\/\/www.itidea.nl\/wp-content\/uploads\/2015\/02\/ExportWPJavascriptInlineStyle_Id-300x22.png 300w, https:\/\/www.itidea.nl\/wp-content\/uploads\/2015\/02\/ExportWPJavascriptInlineStyle_Id-600x44.png 600w, https:\/\/www.itidea.nl\/wp-content\/uploads\/2015\/02\/ExportWPJavascriptInlineStyle_Id-900x67.png 900w, https:\/\/www.itidea.nl\/wp-content\/uploads\/2015\/02\/ExportWPJavascriptInlineStyle_Id.png 1270w\" sizes=\"auto, (max-width: 598px) 100vw, 598px\" \/><\/a><\/p>\n<p>The easiest way to find it is to search for &#8216;MSOMenu_Export&#8217; in the HTML of the page.<br \/>\n<span lang=\"nl\">To easily export the XML representation of the webpart copy the call in the onmenuclick javascript. <\/span><span lang=\"en-US\">(include javascript: before the call)<br \/>\n<\/span>Open the webpart menu as if you were going to export it and paste the javascript into the URL section of the browser and hit enter. You will be prompted to save or open the webpart file.<\/p>\n<h4>Exportwp page<\/h4>\n<p>Another option is to use the exportwp.aspx page, located in the _vti_bin folder, directly. Directly, because the javascript above also uses this page, take a closer look at the code there.<br \/>\n<a href=\"https:\/\/www.itidea.nl\/wp-content\/uploads\/2015\/02\/ExportWPJavascriptParameters.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1955 size-large\" src=\"https:\/\/www.itidea.nl\/wp-content\/uploads\/2015\/02\/ExportWPJavascriptParameters-1024x76.png\" alt=\"ExportWPJavascriptParameters\" width=\"598\" height=\"44\" srcset=\"https:\/\/www.itidea.nl\/wp-content\/uploads\/2015\/02\/ExportWPJavascriptParameters-1024x76.png 1024w, https:\/\/www.itidea.nl\/wp-content\/uploads\/2015\/02\/ExportWPJavascriptParameters-300x22.png 300w, https:\/\/www.itidea.nl\/wp-content\/uploads\/2015\/02\/ExportWPJavascriptParameters-600x44.png 600w, https:\/\/www.itidea.nl\/wp-content\/uploads\/2015\/02\/ExportWPJavascriptParameters-900x67.png 900w, https:\/\/www.itidea.nl\/wp-content\/uploads\/2015\/02\/ExportWPJavascriptParameters.png 1270w\" sizes=\"auto, (max-width: 598px) 100vw, 598px\" \/><\/a><\/p>\n<p>Parameters are the page url and guidstring, which is the guid of the webpart. The javascript gathers all the data for us, but we can also format the call by ourselves.<\/p>\n<p>Get the webpartid from the developer tools:<\/p>\n<p><a href=\"https:\/\/www.itidea.nl\/wp-content\/uploads\/2015\/02\/ExportWPWebPartId.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1959 size-large\" src=\"https:\/\/www.itidea.nl\/wp-content\/uploads\/2015\/02\/ExportWPWebPartId-1024x129.png\" alt=\"ExportWPWebPartId\" width=\"598\" height=\"75\" srcset=\"https:\/\/www.itidea.nl\/wp-content\/uploads\/2015\/02\/ExportWPWebPartId-1024x129.png 1024w, https:\/\/www.itidea.nl\/wp-content\/uploads\/2015\/02\/ExportWPWebPartId-300x37.png 300w, https:\/\/www.itidea.nl\/wp-content\/uploads\/2015\/02\/ExportWPWebPartId-600x75.png 600w, https:\/\/www.itidea.nl\/wp-content\/uploads\/2015\/02\/ExportWPWebPartId-900x113.png 900w, https:\/\/www.itidea.nl\/wp-content\/uploads\/2015\/02\/ExportWPWebPartId.png 1044w\" sizes=\"auto, (max-width: 598px) 100vw, 598px\" \/><\/a><\/p>\n<p>And format the url:<\/p>\n<p>&lt;url of the web where the page is stored&gt;\/_vti_bin\/exportwp.aspx?pageurl=&lt;absolute url of the page where the webpart is placed on&gt;&amp;guidstring=&lt;id of the webpart&gt;<\/p>\n<h4>Enable Export<\/h4>\n<p>The last and faremost the easiest way is to enable the Export functionality of the webpart. Not in the webpart properties, but in the developer tool of the browser:<\/p>\n<p><a href=\"https:\/\/www.itidea.nl\/wp-content\/uploads\/2015\/02\/ExportWPEnableExport.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1958 size-full\" src=\"https:\/\/www.itidea.nl\/wp-content\/uploads\/2015\/02\/ExportWPEnableExport.png\" alt=\"ExportWPEnableExport\" width=\"478\" height=\"55\" srcset=\"https:\/\/www.itidea.nl\/wp-content\/uploads\/2015\/02\/ExportWPEnableExport.png 478w, https:\/\/www.itidea.nl\/wp-content\/uploads\/2015\/02\/ExportWPEnableExport-300x34.png 300w\" sizes=\"auto, (max-width: 478px) 100vw, 478px\" \/><\/a><\/p>\n<p>Set this property to true and the Export menu option is available and working.<\/p>\n<h3>Summary<\/h3>\n<p>There are several ways to export a webpart when the Export option isn&#8217;t available in the menu of the webpart. To enable this is the faremost easiest option when it is available. Otherwise the user of the exportwp page is a close second.<br \/>\n<a href=\"https:\/\/www.itidea.nl\/wp-content\/uploads\/2015\/02\/ExportWPWebPartId.png\"><\/p>\n<p><\/a><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Some webparts can&#8217;t be exported by the UI to get the XML representation of it. Listview webparts are one of them. To get the XML anyway there are three\u00a0options to do so: Use javascript from the Export option Use the &#8230; <a class=\"more-link\" href=\"https:\/\/www.itidea.nl\/index.php\/quick-tip-exporting-a-webpart\/\">Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[35],"tags":[37,42,44],"class_list":["post-1954","post","type-post","status-publish","format-standard","hentry","category-sharepoint-2013","tag-office365","tag-sharepoint-2010","tag-sharepoint-2013"],"_links":{"self":[{"href":"https:\/\/www.itidea.nl\/index.php\/wp-json\/wp\/v2\/posts\/1954","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.itidea.nl\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.itidea.nl\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.itidea.nl\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.itidea.nl\/index.php\/wp-json\/wp\/v2\/comments?post=1954"}],"version-history":[{"count":6,"href":"https:\/\/www.itidea.nl\/index.php\/wp-json\/wp\/v2\/posts\/1954\/revisions"}],"predecessor-version":[{"id":1965,"href":"https:\/\/www.itidea.nl\/index.php\/wp-json\/wp\/v2\/posts\/1954\/revisions\/1965"}],"wp:attachment":[{"href":"https:\/\/www.itidea.nl\/index.php\/wp-json\/wp\/v2\/media?parent=1954"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.itidea.nl\/index.php\/wp-json\/wp\/v2\/categories?post=1954"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.itidea.nl\/index.php\/wp-json\/wp\/v2\/tags?post=1954"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}