{"id":311,"date":"2025-10-24T22:36:12","date_gmt":"2025-10-24T20:36:12","guid":{"rendered":"https:\/\/www.silverice.it\/IpercubeTechWP1\/?page_id=311"},"modified":"2025-10-25T10:12:23","modified_gmt":"2025-10-25T08:12:23","slug":"convertdatatable2htmlpage","status":"publish","type":"page","link":"https:\/\/www.silverice.it\/IpercubeTechWP1\/ipercube-utilities\/data-table-functions\/convertdatatable2htmlpage\/","title":{"rendered":"Convert DataTable to Html Page"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Converts a DataTable into a full HTML page, including styling and an optional title.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This function builds a styled HTML document with embedded CSS, including alternating row colors, borders, and spacing. The table contents are generated using the <strong>ConvertDataTable2HtmlTable <\/strong>function.<\/p>\n\n\n\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained\">\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-8f761849 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:75%\">\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-8f761849 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column page-snippet is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:100%\">\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-Geist-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-Geist-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(2 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2b2b2b;color:#c7c7c7\">VB<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>    Public Function ConvertDataTable2HtmlPage(DataTable As Data.DataTable, \n                                              Optional title As String = \"\", \n                                              Optional fontName As String = \"Calibri\") As String\n        ' No data\n        If DataTable Is Nothing OrElse DataTable.Rows.Count = 0 Then\n            Return $\"&lt;html>&lt;body>&lt;p style='font-family:{fontName};'>No data available&lt;\/p>&lt;\/body>&lt;\/html>\"\n        End If\n\n        ' Build HTML\n        Dim htmlBuilder As New Text.StringBuilder()\n\n        ' Set Style\n        htmlBuilder.AppendLine(\"&lt;!DOCTYPE html>\")\n        htmlBuilder.AppendLine(\"&lt;html lang=\"\"en\"\">\")\n        htmlBuilder.AppendLine(\"&lt;head>\")\n        htmlBuilder.AppendLine(\"    &lt;meta charset=\"\"UTF-8\"\">\")\n        htmlBuilder.AppendLine(\"    &lt;meta name=\"\"viewport\"\" content=\"\"width=device-width, initial-scale=1.0\"\">\")\n        htmlBuilder.AppendLine($\"    &lt;title>{title}&lt;\/title>\")\n        htmlBuilder.AppendLine(\"    &lt;style>\")\n        htmlBuilder.AppendLine(\"        body {\")\n        htmlBuilder.AppendLine($\"            font-family: {fontName}, Consolas;\")\n        htmlBuilder.AppendLine(\"            margin: 20px;\")\n        htmlBuilder.AppendLine(\"        }\")\n        htmlBuilder.AppendLine(\"        table {\")\n        htmlBuilder.AppendLine(\"            width: 100%;\")\n        htmlBuilder.AppendLine(\"            border-collapse: collapse;\")\n        htmlBuilder.AppendLine(\"            margin-top: 20px;\")\n        htmlBuilder.AppendLine(\"        }\")\n        htmlBuilder.AppendLine(\"        th, td {\")\n        htmlBuilder.AppendLine(\"            border: 1px solid #ccc;\")\n        htmlBuilder.AppendLine(\"            padding: 8px;\")\n        htmlBuilder.AppendLine(\"            text-align: left;\")\n        htmlBuilder.AppendLine(\"        }\")\n        htmlBuilder.AppendLine(\"        th {\")\n        htmlBuilder.AppendLine(\"            background-color: #f4f4f4;\")\n        htmlBuilder.AppendLine(\"        }\")\n        htmlBuilder.AppendLine(\"        tr:nth-child(even) {\")\n        htmlBuilder.AppendLine(\"            background-color: #f9f9f9;\")\n        htmlBuilder.AppendLine(\"        }\")\n        htmlBuilder.AppendLine(\"    &lt;\/style>\")\n        htmlBuilder.AppendLine(\"&lt;\/head>\")\n\n        htmlBuilder.AppendLine(\"&lt;body>\")\n\n        ' Title if any\n        If Not String.IsNullOrEmpty(title) Then\n            htmlBuilder.AppendLine($\"&lt;h1>{title}&lt;\/h1>\")\n        End If\n\n        ' Build html table\n        htmlBuilder.AppendLine(ConvertDataTable2HtmlTable(DataTable, fontName))\n\n        htmlBuilder.AppendLine(\"&lt;\/body>\")\n        htmlBuilder.AppendLine(\"&lt;\/html>\")\n\n        Return htmlBuilder.ToString()\n\n    End Function<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D4D4D4\">    <\/span><span style=\"color: #569CD6\">Public Function <\/span><span style=\"color: #DCDCAA\">ConvertDataTable2HtmlPage<\/span><span style=\"color: #D4D4D4\">(<\/span><span style=\"color: #9CDCFE\">DataTable<\/span><span style=\"color: #D4D4D4\"> As <\/span><span style=\"color: #4EC9B0\">Data<\/span><span style=\"color: #D4D4D4\">.DataTable, <\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">                                              Optional title As <\/span><span style=\"color: #4EC9B0\">String<\/span><span style=\"color: #D4D4D4\"> = <\/span><span style=\"color: #CE9178\">&quot;&quot;<\/span><span style=\"color: #D4D4D4\">, <\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">                                              Optional fontName As <\/span><span style=\"color: #4EC9B0\">String<\/span><span style=\"color: #D4D4D4\"> = <\/span><span style=\"color: #CE9178\">&quot;Calibri&quot;<\/span><span style=\"color: #D4D4D4\">) As <\/span><span style=\"color: #4EC9B0\">String<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        <\/span><span style=\"color: #6A9955\">&#39; No data<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        <\/span><span style=\"color: #C586C0\">If<\/span><span style=\"color: #D4D4D4\"> DataTable Is<\/span><span style=\"color: #569CD6\"> Nothing<\/span><span style=\"color: #D4D4D4\"> OrElse DataTable.Rows.<\/span><span style=\"color: #9CDCFE\">Count<\/span><span style=\"color: #D4D4D4\"> = <\/span><span style=\"color: #B5CEA8\">0<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #C586C0\">Then<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">            <\/span><span style=\"color: #C586C0\">Return<\/span><span style=\"color: #D4D4D4\"> $<\/span><span style=\"color: #CE9178\">&quot;&lt;html&gt;&lt;body&gt;&lt;p style=&#39;font-family:{fontName};&#39;&gt;No data available&lt;\/p&gt;&lt;\/body&gt;&lt;\/html&gt;&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        <\/span><span style=\"color: #C586C0\">End If<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        <\/span><span style=\"color: #6A9955\">&#39; Build HTML<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        <\/span><span style=\"color: #569CD6\">Dim<\/span><span style=\"color: #9CDCFE\"> htmlBuilder <\/span><span style=\"color: #D4D4D4\">As<\/span><span style=\"color: #569CD6\"> New <\/span><span style=\"color: #D4D4D4\">Text.<\/span><span style=\"color: #DCDCAA\">StringBuilder<\/span><span style=\"color: #D4D4D4\">()<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        <\/span><span style=\"color: #6A9955\">&#39; Set Style<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        htmlBuilder.<\/span><span style=\"color: #DCDCAA\">AppendLine<\/span><span style=\"color: #D4D4D4\">(<\/span><span style=\"color: #CE9178\">&quot;&lt;!DOCTYPE html&gt;&quot;<\/span><span style=\"color: #D4D4D4\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        htmlBuilder.<\/span><span style=\"color: #DCDCAA\">AppendLine<\/span><span style=\"color: #D4D4D4\">(<\/span><span style=\"color: #CE9178\">&quot;&lt;html lang=&quot;&quot;en&quot;&quot;&gt;&quot;<\/span><span style=\"color: #D4D4D4\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        htmlBuilder.<\/span><span style=\"color: #DCDCAA\">AppendLine<\/span><span style=\"color: #D4D4D4\">(<\/span><span style=\"color: #CE9178\">&quot;&lt;head&gt;&quot;<\/span><span style=\"color: #D4D4D4\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        htmlBuilder.<\/span><span style=\"color: #DCDCAA\">AppendLine<\/span><span style=\"color: #D4D4D4\">(<\/span><span style=\"color: #CE9178\">&quot;    &lt;meta charset=&quot;&quot;UTF-8&quot;&quot;&gt;&quot;<\/span><span style=\"color: #D4D4D4\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        htmlBuilder.<\/span><span style=\"color: #DCDCAA\">AppendLine<\/span><span style=\"color: #D4D4D4\">(<\/span><span style=\"color: #CE9178\">&quot;    &lt;meta name=&quot;&quot;viewport&quot;&quot; content=&quot;&quot;width=device-width, initial-scale=1.0&quot;&quot;&gt;&quot;<\/span><span style=\"color: #D4D4D4\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        htmlBuilder.<\/span><span style=\"color: #DCDCAA\">AppendLine<\/span><span style=\"color: #D4D4D4\">($<\/span><span style=\"color: #CE9178\">&quot;    &lt;title&gt;{title}&lt;\/title&gt;&quot;<\/span><span style=\"color: #D4D4D4\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        htmlBuilder.<\/span><span style=\"color: #DCDCAA\">AppendLine<\/span><span style=\"color: #D4D4D4\">(<\/span><span style=\"color: #CE9178\">&quot;    &lt;style&gt;&quot;<\/span><span style=\"color: #D4D4D4\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        htmlBuilder.<\/span><span style=\"color: #DCDCAA\">AppendLine<\/span><span style=\"color: #D4D4D4\">(<\/span><span style=\"color: #CE9178\">&quot;        body {&quot;<\/span><span style=\"color: #D4D4D4\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        htmlBuilder.<\/span><span style=\"color: #DCDCAA\">AppendLine<\/span><span style=\"color: #D4D4D4\">($<\/span><span style=\"color: #CE9178\">&quot;            font-family: {fontName}, Consolas;&quot;<\/span><span style=\"color: #D4D4D4\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        htmlBuilder.<\/span><span style=\"color: #DCDCAA\">AppendLine<\/span><span style=\"color: #D4D4D4\">(<\/span><span style=\"color: #CE9178\">&quot;            margin: 20px;&quot;<\/span><span style=\"color: #D4D4D4\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        htmlBuilder.<\/span><span style=\"color: #DCDCAA\">AppendLine<\/span><span style=\"color: #D4D4D4\">(<\/span><span style=\"color: #CE9178\">&quot;        }&quot;<\/span><span style=\"color: #D4D4D4\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        htmlBuilder.<\/span><span style=\"color: #DCDCAA\">AppendLine<\/span><span style=\"color: #D4D4D4\">(<\/span><span style=\"color: #CE9178\">&quot;        table {&quot;<\/span><span style=\"color: #D4D4D4\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        htmlBuilder.<\/span><span style=\"color: #DCDCAA\">AppendLine<\/span><span style=\"color: #D4D4D4\">(<\/span><span style=\"color: #CE9178\">&quot;            width: 100%;&quot;<\/span><span style=\"color: #D4D4D4\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        htmlBuilder.<\/span><span style=\"color: #DCDCAA\">AppendLine<\/span><span style=\"color: #D4D4D4\">(<\/span><span style=\"color: #CE9178\">&quot;            border-collapse: collapse;&quot;<\/span><span style=\"color: #D4D4D4\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        htmlBuilder.<\/span><span style=\"color: #DCDCAA\">AppendLine<\/span><span style=\"color: #D4D4D4\">(<\/span><span style=\"color: #CE9178\">&quot;            margin-top: 20px;&quot;<\/span><span style=\"color: #D4D4D4\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        htmlBuilder.<\/span><span style=\"color: #DCDCAA\">AppendLine<\/span><span style=\"color: #D4D4D4\">(<\/span><span style=\"color: #CE9178\">&quot;        }&quot;<\/span><span style=\"color: #D4D4D4\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        htmlBuilder.<\/span><span style=\"color: #DCDCAA\">AppendLine<\/span><span style=\"color: #D4D4D4\">(<\/span><span style=\"color: #CE9178\">&quot;        th, td {&quot;<\/span><span style=\"color: #D4D4D4\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        htmlBuilder.<\/span><span style=\"color: #DCDCAA\">AppendLine<\/span><span style=\"color: #D4D4D4\">(<\/span><span style=\"color: #CE9178\">&quot;            border: 1px solid #ccc;&quot;<\/span><span style=\"color: #D4D4D4\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        htmlBuilder.<\/span><span style=\"color: #DCDCAA\">AppendLine<\/span><span style=\"color: #D4D4D4\">(<\/span><span style=\"color: #CE9178\">&quot;            padding: 8px;&quot;<\/span><span style=\"color: #D4D4D4\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        htmlBuilder.<\/span><span style=\"color: #DCDCAA\">AppendLine<\/span><span style=\"color: #D4D4D4\">(<\/span><span style=\"color: #CE9178\">&quot;            text-align: left;&quot;<\/span><span style=\"color: #D4D4D4\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        htmlBuilder.<\/span><span style=\"color: #DCDCAA\">AppendLine<\/span><span style=\"color: #D4D4D4\">(<\/span><span style=\"color: #CE9178\">&quot;        }&quot;<\/span><span style=\"color: #D4D4D4\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        htmlBuilder.<\/span><span style=\"color: #DCDCAA\">AppendLine<\/span><span style=\"color: #D4D4D4\">(<\/span><span style=\"color: #CE9178\">&quot;        th {&quot;<\/span><span style=\"color: #D4D4D4\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        htmlBuilder.<\/span><span style=\"color: #DCDCAA\">AppendLine<\/span><span style=\"color: #D4D4D4\">(<\/span><span style=\"color: #CE9178\">&quot;            background-color: #f4f4f4;&quot;<\/span><span style=\"color: #D4D4D4\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        htmlBuilder.<\/span><span style=\"color: #DCDCAA\">AppendLine<\/span><span style=\"color: #D4D4D4\">(<\/span><span style=\"color: #CE9178\">&quot;        }&quot;<\/span><span style=\"color: #D4D4D4\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        htmlBuilder.<\/span><span style=\"color: #DCDCAA\">AppendLine<\/span><span style=\"color: #D4D4D4\">(<\/span><span style=\"color: #CE9178\">&quot;        tr:nth-child(even) {&quot;<\/span><span style=\"color: #D4D4D4\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        htmlBuilder.<\/span><span style=\"color: #DCDCAA\">AppendLine<\/span><span style=\"color: #D4D4D4\">(<\/span><span style=\"color: #CE9178\">&quot;            background-color: #f9f9f9;&quot;<\/span><span style=\"color: #D4D4D4\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        htmlBuilder.<\/span><span style=\"color: #DCDCAA\">AppendLine<\/span><span style=\"color: #D4D4D4\">(<\/span><span style=\"color: #CE9178\">&quot;        }&quot;<\/span><span style=\"color: #D4D4D4\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        htmlBuilder.<\/span><span style=\"color: #DCDCAA\">AppendLine<\/span><span style=\"color: #D4D4D4\">(<\/span><span style=\"color: #CE9178\">&quot;    &lt;\/style&gt;&quot;<\/span><span style=\"color: #D4D4D4\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        htmlBuilder.<\/span><span style=\"color: #DCDCAA\">AppendLine<\/span><span style=\"color: #D4D4D4\">(<\/span><span style=\"color: #CE9178\">&quot;&lt;\/head&gt;&quot;<\/span><span style=\"color: #D4D4D4\">)<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        htmlBuilder.<\/span><span style=\"color: #DCDCAA\">AppendLine<\/span><span style=\"color: #D4D4D4\">(<\/span><span style=\"color: #CE9178\">&quot;&lt;body&gt;&quot;<\/span><span style=\"color: #D4D4D4\">)<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        <\/span><span style=\"color: #6A9955\">&#39; Title if any<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        <\/span><span style=\"color: #C586C0\">If<\/span><span style=\"color: #D4D4D4\"> Not <\/span><span style=\"color: #DCDCAA\">String<\/span><span style=\"color: #D4D4D4\">.<\/span><span style=\"color: #DCDCAA\">IsNullOrEmpty<\/span><span style=\"color: #D4D4D4\">(<\/span><span style=\"color: #9CDCFE\">title<\/span><span style=\"color: #D4D4D4\">) <\/span><span style=\"color: #C586C0\">Then<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">            htmlBuilder.<\/span><span style=\"color: #DCDCAA\">AppendLine<\/span><span style=\"color: #D4D4D4\">($<\/span><span style=\"color: #CE9178\">&quot;&lt;h1&gt;{title}&lt;\/h1&gt;&quot;<\/span><span style=\"color: #D4D4D4\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        <\/span><span style=\"color: #C586C0\">End If<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        <\/span><span style=\"color: #6A9955\">&#39; Build html table<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        htmlBuilder.<\/span><span style=\"color: #DCDCAA\">AppendLine<\/span><span style=\"color: #D4D4D4\">(<\/span><span style=\"color: #DCDCAA\">ConvertDataTable2HtmlTable<\/span><span style=\"color: #D4D4D4\">(<\/span><span style=\"color: #9CDCFE\">DataTable<\/span><span style=\"color: #D4D4D4\">,<\/span><span style=\"color: #9CDCFE\"> fontName<\/span><span style=\"color: #D4D4D4\">))<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        htmlBuilder.<\/span><span style=\"color: #DCDCAA\">AppendLine<\/span><span style=\"color: #D4D4D4\">(<\/span><span style=\"color: #CE9178\">&quot;&lt;\/body&gt;&quot;<\/span><span style=\"color: #D4D4D4\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        htmlBuilder.<\/span><span style=\"color: #DCDCAA\">AppendLine<\/span><span style=\"color: #D4D4D4\">(<\/span><span style=\"color: #CE9178\">&quot;&lt;\/html&gt;&quot;<\/span><span style=\"color: #D4D4D4\">)<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        <\/span><span style=\"color: #C586C0\">Return<\/span><span style=\"color: #D4D4D4\"> htmlBuilder.<\/span><span style=\"color: #DCDCAA\">ToString<\/span><span style=\"color: #D4D4D4\">()<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    <\/span><span style=\"color: #569CD6\">End Function<\/span><\/span><\/code><\/pre><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Converts a DataTable into a full HTML page, including styling and an optional title. This function builds a styled HTML document with embedded CSS, including alternating row colors, borders, and spacing. The table contents are generated using the ConvertDataTable2HtmlTable function.<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":282,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-311","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.silverice.it\/IpercubeTechWP1\/wp-json\/wp\/v2\/pages\/311","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silverice.it\/IpercubeTechWP1\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.silverice.it\/IpercubeTechWP1\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.silverice.it\/IpercubeTechWP1\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silverice.it\/IpercubeTechWP1\/wp-json\/wp\/v2\/comments?post=311"}],"version-history":[{"count":3,"href":"https:\/\/www.silverice.it\/IpercubeTechWP1\/wp-json\/wp\/v2\/pages\/311\/revisions"}],"predecessor-version":[{"id":369,"href":"https:\/\/www.silverice.it\/IpercubeTechWP1\/wp-json\/wp\/v2\/pages\/311\/revisions\/369"}],"up":[{"embeddable":true,"href":"https:\/\/www.silverice.it\/IpercubeTechWP1\/wp-json\/wp\/v2\/pages\/282"}],"wp:attachment":[{"href":"https:\/\/www.silverice.it\/IpercubeTechWP1\/wp-json\/wp\/v2\/media?parent=311"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}