{"id":39577,"date":"2025-08-21T04:55:47","date_gmt":"2025-08-21T04:55:47","guid":{"rendered":"http:\/\/www.withdata.com\/blog\/?p=39577"},"modified":"2026-07-08T09:03:44","modified_gmt":"2026-07-08T09:03:44","slug":"upsert-postgresql-data-from-html","status":"publish","type":"post","link":"https:\/\/www.withdata.com\/blog\/htmltopostgres\/upsert-postgresql-data-from-html.html","title":{"rendered":"Upsert data from HTML file to PostgreSQL"},"content":{"rendered":"<p>Want to upsert data from HTML file to  <a href=\"https:\/\/www.postgresql.org\/\">PostgreSQL<\/a> ?<\/p>\n<p>Upsert: inserts rows into a table if they do not already exist, or updates them if they do.<\/p>\n<p>Try Withdata <a href=\"https:\/\/www.withdata.com\/file-to-db\/\">FileToDB<\/a>, a HTML file to PostgreSQL converter, Upsert data from HTML file to PostgreSQL, Easy and Fast.<\/p>\n<ul>\n<li>Can run in <span id=\"gui\">GUI<\/span> mode, <a href=\"#convert\">Step by Step<\/a>, just a few mouse clicks.<\/li>\n<li>Can run in <a href=\"\/tools\/file-to-db\/html-to-postgres-cmd\" target=\"_blank\">Command line<\/a>, for <a href=\"\/tools\/file-to-db\/html-to-postgres-task\" target=\"_blank\">Scheduled Tasks<\/a> and Streams.<\/li>\n<li>Import HTML to PostgreSQL locally and <b>privately<\/b>, avoid uploading HTML file(s) to online services.<\/li>\n<li>Support <a href=\"\/tools\/file-to-db\/html-to-postgres-windows\" target=\"_blank\">Windows<\/a>, <a href=\"\/tools\/file-to-db\/html-to-postgres-linux\" target=\"_blank\">Linux<\/a>, and <a href=\"\/tools\/file-to-db\/html-to-postgres-macos\" target=\"_blank\">macOS<\/a>.<\/li>\n<\/ul>\n<p><a href=\"#download-top\" onclick=\"dtv.style.display = 'block';\">Download Withdata FileToDB<\/a>  <a href=\"#download-top\" onclick=\"dtv.style.display = 'block';\"><img decoding=\"async\" src=\"https:\/\/www.withdata.com\/images\/download_3.jpg\" alt=\"Download FileToDB\" width=\"80\" height=\"22\" style=\"max-width:100%;height:auto;\" \/><\/a> <span id=\"dtv\" style=\"display: none;\"><br \/>\n<a href=\"\/download.php?app=FileToDB&#038;ver=win64\">Windows 64 bit<\/a><br \/>\n<a href=\"\/download.php?app=FileToDB&#038;ver=win32\">Windows 32 bit<\/a><br \/>\n<a href=\"\/download.php?app=FileToDB&#038;ver=deb\">Linux .deb (For Debian, Ubuntu) 64 bit<\/a><br \/>\n<a href=\"\/download.php?app=FileToDB&#038;ver=rpm\">Linux .rpm (For Red Hat, Fedora, SUSE) 64 bit<\/a><br \/>\n<a href=\"\/download.php?app=FileToDB&#038;ver=pkg\">MacOS 64 bit<\/a><br \/>\n<\/span><\/p>\n<h2>Upsert data from HTML file to PostgreSQL<\/h2>\n<p> Choose PostgreSQL and logon.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.withdata.com\/images\/logon\/choose_postgresql_logon.png\" alt=\"convert HTML file to PostgreSQL table - Choose PostgreSQL and logon\" width=\"430\" height=\"441\" style=\"max-width:100%;height:auto;display:block;\" \/><\/p>\n<p> Click &#8220;Wizard &#8211; 1 File To 1 Table&#8221; at task dialog.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.withdata.com\/images\/file-to-db\/task-window.png\" alt=\"convert HTML file to PostgreSQL table - task window\" width=\"722\" height=\"399\" style=\"max-width:100%;height:auto;display:block;\" loading=\"lazy\" decoding=\"async\" \/><\/p>\n<p> Select the &#8220;HTML&#8221; file type.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.withdata.com\/images\/file-to-db\/select-file-type-html.png\" ALT=\"Import file data to database table - select file type\" width=\"642\" height=\"236\" style=\"max-width:100%;height:auto;display:block;\" loading=\"lazy\" decoding=\"async\"><\/p>\n<p>then show the wizard.<\/p>\n<h3>1. Open a HTML file.<\/h3>\n<p><img decoding=\"async\" src=\"https:\/\/www.withdata.com\/images\/file-to-db\/wizard-import-file-source-file-html.png\" ALT=\"Upsert Data From HTML To PostgreSQL - open HTML file\" width=\"722\" height=\"572\" style=\"max-width:100%;height:auto;display:block;\" loading=\"lazy\" decoding=\"async\"><\/p>\n<h3>2. Select a table and config fields.<\/h3>\n<p>Set &#8220;Load Type&#8221; to &#8220;Upsert&#8221;, choice &#8220;By Key&#8221;.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.withdata.com\/images\/file-to-db\/wizard-upsert-dest-table.png\" ALT=\"Upsert Data From HTML To PostgreSQL - select table\" width=\"722\" height=\"572\" style=\"max-width:100%;height:auto;display:block;\" loading=\"lazy\" decoding=\"async\"><\/p>\n<h3>3. Preview data.<\/h3>\n<p><img decoding=\"async\" src=\"https:\/\/www.withdata.com\/images\/file-to-db\/wizard-import-preview-html.png\" ALT=\"Upsert Data From HTML To PostgreSQL - preview\" width=\"722\" height=\"572\" style=\"max-width:100%;height:auto;display:block;\" loading=\"lazy\" decoding=\"async\"><\/p>\n<h3>4. Upsert HTML data to PostgreSQL.<\/h3>\n<p><img decoding=\"async\" src=\"https:\/\/www.withdata.com\/images\/file-to-db\/wizard-import-convert-html.png\" ALT=\"Upsert Data From HTML To PostgreSQL - import data\" width=\"722\" height=\"572\" style=\"max-width:100%;height:auto;display:block;\" loading=\"lazy\" decoding=\"async\"><\/p>\n<hr style=\"clear: both;\" \/>\n<p>More about <a href=\"\/tools\/file-to-db\/html-to-postgres\">HTML file to PostgreSQL converter<\/a><\/p>\n<div id=\"download-bottom\" style=\"clear: both;\">\n<p>Download Withdata FileToDB<a href=\"#download-bottom\" onclick=\"dbv.style.display = 'block';\"><img decoding=\"async\" src=\"https:\/\/www.withdata.com\/images\/btn_download_green.png\" alt=\"Download FileToDB\" width=\"165\" height=\"50\" style=\"max-width:100%;height:auto;\" loading=\"lazy\" decoding=\"async\" \/><\/a> <span id=\"dbv\" style=\"display: none;\"><br \/>\n<a href=\"\/download.php?app=FileToDB&#038;ver=win64\">Windows 64 bit<\/a><br \/>\n<a href=\"\/download.php?app=FileToDB&#038;ver=win32\">Windows 32 bit<\/a><br \/>\n<a href=\"\/download.php?app=FileToDB&#038;ver=deb\">Linux .deb (For Debian, Ubuntu) 64 bit<\/a><br \/>\n<a href=\"\/download.php?app=FileToDB&#038;ver=rpm\">Linux .rpm (For Red Hat, Fedora, SUSE) 64 bit<\/a><br \/>\n<a href=\"\/download.php?app=FileToDB&#038;ver=pkg\">MacOS 64 bit<\/a><br \/>\n<\/span><\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Want to upsert data from HTML file to PostgreSQL ? Upsert: inserts rows into a table if they do not already exist, or updates them if they do. Try Withdata FileToDB, a HTML file to PostgreSQL converter, Upsert data from HTML file to PostgreSQL, Easy and Fast. Can run in GUI mode, Step by Step, [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13155],"tags":[66,1370,428],"class_list":["post-39577","post","type-post","status-publish","format-standard","hentry","category-htmltopostgres","tag-html","tag-postgresql","tag-upsert"],"_links":{"self":[{"href":"https:\/\/www.withdata.com\/blog\/wp-json\/wp\/v2\/posts\/39577","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=39577"}],"version-history":[{"count":1,"href":"https:\/\/www.withdata.com\/blog\/wp-json\/wp\/v2\/posts\/39577\/revisions"}],"predecessor-version":[{"id":39578,"href":"https:\/\/www.withdata.com\/blog\/wp-json\/wp\/v2\/posts\/39577\/revisions\/39578"}],"wp:attachment":[{"href":"https:\/\/www.withdata.com\/blog\/wp-json\/wp\/v2\/media?parent=39577"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.withdata.com\/blog\/wp-json\/wp\/v2\/categories?post=39577"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.withdata.com\/blog\/wp-json\/wp\/v2\/tags?post=39577"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}