{"id":2888,"date":"2014-01-19T05:08:43","date_gmt":"2014-01-19T05:08:43","guid":{"rendered":"http:\/\/www.withdata.com\/blog\/?p=2888"},"modified":"2026-07-15T05:00:56","modified_gmt":"2026-07-15T05:00:56","slug":"export-postgresql-query-results-to-flat-file-csv-txt-sql-xml-html","status":"publish","type":"post","link":"https:\/\/www.withdata.com\/blog\/pgtotxt\/export-postgresql-query-results-to-flat-file-csv-txt-sql-xml-html.html","title":{"rendered":"Export PostgreSQL query results to flat file (CSV, TXT, SQL, XML, HTML)"},"content":{"rendered":"<p>Want to export data from  <a href=\"https:\/\/www.postgresql.org\/\">PostgreSQL<\/a>  query to  <a href=\"https:\/\/www.w3.org\/html\/\">HTML<\/a>  file?<\/p>\n<p>Using PGToTxt, you can export data from PostgreSQL query to Html file easily and fast, just a few mouse clicks!<\/p>\n<p><a href=\"\/down\/PGToTxt.exe\"><img decoding=\"async\" src=\"\/images\/btn_download_green.gif\" alt=\"download\" width=\"136\" height=\"41\" style=\"max-width:100%;height:auto;\" \/><\/a> and install PGToTxt.<\/p>\n<h2>Export data from PostgreSQL query to Html file<\/h2>\n<p> Click &#8220;Export From Query&#8221; at task dialog.<\/p>\n<p><img decoding=\"async\" src=\"\/images\/dbtofile\/wizard-task.gif\" ALT=\"Export data from PostgreSQL Query To Html File - task window\" width=\"635\" height=\"415\" style=\"max-width:100%;height:auto;display:block;\"><\/p>\n<p>then show the Export Query form.<\/p>\n<p>1. Select Html file type.<\/p>\n<p><img decoding=\"async\" src=\"\/images\/dbtofile\/select-html-type.gif\" ALT=\"Export Query Results from PostgreSQL Table To Html File - select Html file type\" width=\"636\" height=\"438\" style=\"max-width:100%;height:auto;display:block;\" loading=\"lazy\" decoding=\"async\"><\/p>\n<p>2. Enter query.<\/p>\n<p><img decoding=\"async\" src=\"\/images\/dbtofile\/query-to-a-file-source.gif\" ALT=\"Unload data from PostgreSQL Query ResultSet To Html File - select table\" width=\"636\" height=\"438\" style=\"max-width:100%;height:auto;display:block;\" loading=\"lazy\" decoding=\"async\"><\/p>\n<p>3. Enter data file name.<\/p>\n<p><img decoding=\"async\" src=\"\/images\/dbtofile\/query-to-html-target.gif\" ALT=\"Extract data from PostgreSQL Query Results To Html File - enter file name\" width=\"636\" height=\"438\" style=\"max-width:100%;height:auto;display:block;\" loading=\"lazy\" decoding=\"async\"><\/p>\n<p>4. Summary.<\/p>\n<p><img decoding=\"async\" src=\"\/images\/dbtofile\/query-to-html-summary.gif\" ALT=\"Convert data from PostgreSQL Query ResultSet To Html File - summary\" width=\"636\" height=\"438\" style=\"max-width:100%;height:auto;display:block;\" loading=\"lazy\" decoding=\"async\"><\/p>\n<p>5. Export.<\/p>\n<p><img decoding=\"async\" src=\"\/images\/dbtofile\/query-to-html-convert.gif\" ALT=\"Dump data from PostgreSQL SQL Query To Html File - export\" width=\"636\" height=\"438\" style=\"max-width:100%;height:auto;display:block;\" loading=\"lazy\" decoding=\"async\"><\/p>\n<hr style=\"clear: both;\" \/>\n<p><a href=\"\/pgtotxt\/\">More about PGToTxt &#8211; the tool to export data from PostgreSQL query to Html file<\/a><\/p>\n<div style=\"clear: both;\">\n<p>30-day free trial <a href=\"\/down\/PGToTxt.exe\"><img decoding=\"async\" src=\"\/images\/btn_download_green.gif\" alt=\"Download PGToTxt\" width=\"136\" height=\"41\" style=\"max-width:100%;height:auto;\" loading=\"lazy\" decoding=\"async\" \/><\/a>US$59.95 <a href=\"\/pgtotxt\/purchase.html\"><img decoding=\"async\" src=\"\/images\/btn_buynow_green.gif\" alt=\"Buy PGToTxt\" width=\"136\" height=\"41\" style=\"max-width:100%;height:auto;\" loading=\"lazy\" decoding=\"async\" \/> <\/a><\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Want to export data from PostgreSQL query to HTML file? Using PGToTxt, you can export data from PostgreSQL query to Html file easily and fast, just a few mouse clicks! and install PGToTxt. Export data from PostgreSQL query to Html file Click &#8220;Export From Query&#8221; at task dialog. then show the Export Query form. 1. [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[473],"tags":[1377,560,563,561,562],"class_list":["post-2888","post","type-post","status-publish","format-standard","hentry","category-pgtotxt","tag-pgtotxt","tag-postgresql-query-results-export-to-csv","tag-postgresql-query-results-export-to-html","tag-postgresql-query-results-export-to-txt","tag-postgresql-query-results-export-to-xml"],"_links":{"self":[{"href":"https:\/\/www.withdata.com\/blog\/wp-json\/wp\/v2\/posts\/2888","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.withdata.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.withdata.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.withdata.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.withdata.com\/blog\/wp-json\/wp\/v2\/comments?post=2888"}],"version-history":[{"count":8,"href":"https:\/\/www.withdata.com\/blog\/wp-json\/wp\/v2\/posts\/2888\/revisions"}],"predecessor-version":[{"id":4406,"href":"https:\/\/www.withdata.com\/blog\/wp-json\/wp\/v2\/posts\/2888\/revisions\/4406"}],"wp:attachment":[{"href":"https:\/\/www.withdata.com\/blog\/wp-json\/wp\/v2\/media?parent=2888"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.withdata.com\/blog\/wp-json\/wp\/v2\/categories?post=2888"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.withdata.com\/blog\/wp-json\/wp\/v2\/tags?post=2888"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}