{"id":3584,"date":"2018-05-22T22:16:51","date_gmt":"2018-05-22T22:16:51","guid":{"rendered":"https:\/\/zappysys.com\/blog\/?p=3584"},"modified":"2018-05-30T14:37:19","modified_gmt":"2018-05-30T14:37:19","slug":"read-and-write-data-to-html-in-ssis","status":"publish","type":"post","link":"https:\/\/zappysys.com\/blog\/read-and-write-data-to-html-in-ssis\/","title":{"rendered":"How to read and write data to HTML in SSIS"},"content":{"rendered":"<h2>Introduction to read and write data to HTML in SSIS<\/h2>\n<p><a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/2000px-HTML5_logo_and_wordmark.svg_.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft wp-image-3618 size-thumbnail\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/2000px-HTML5_logo_and_wordmark.svg_-150x150.png\" alt=\"HTML icon\" width=\"150\" height=\"150\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/2000px-HTML5_logo_and_wordmark.svg_-150x150.png 150w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/2000px-HTML5_logo_and_wordmark.svg_-300x300.png 300w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/2000px-HTML5_logo_and_wordmark.svg_-768x768.png 768w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/2000px-HTML5_logo_and_wordmark.svg_-1024x1024.png 1024w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/2000px-HTML5_logo_and_wordmark.svg_.png 2000w\" sizes=\"(max-width: 150px) 100vw, 150px\" \/><\/a>In this article, we will show how to send values from an SSIS Variable to an HTML file. We will use the <a href=\"https:\/\/zappysys.com\/products\/ssis-powerpack\/ssis-file-system-task-advanced\/\">SSIS Advanced File System Task <\/a> to store the list of system files of a folder into a variable and then we will use the <a href=\"https:\/\/zappysys.com\/products\/ssis-powerpack\/ssis-logging-task-free\/\">SSIS Logging Task<\/a> to store the variable in an HTML file.<\/p>\n<p>In the second part, we will read values from an HTML table and export the data into SQL Server. We will use the HTML file created in the first example. We will also use the <a href=\"https:\/\/zappysys.com\/products\/ssis-powerpack\/ssis-html-table-source\/\">ZS HTML Table Source<\/a> to read the data from the HTML table and export to SQL Server using the OLEDB Destination.<\/p>\n<p>We will be using this\u00a0<a href=\"https:\/\/zappysys.com\/products\/ssis-powerpack\/\" target=\"_blank\" rel=\"noopener\">ZappySys SSIS PowerPack<\/a>\u00a0component to make things work:<br \/>\n<div class=\"su-table su-table-alternate\">\n<table width=\"300\">\n<tbody>\n<tr style=\"line-height: 0px\">\n<td width=\"50px\"><a href=\"https:\/\/zappysys.com\/products\/ssis-powerpack\/ssis-logging-task-free\/\" target=\"_blank\" rel=\"noopener\"><br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3074\" src=\"https:\/\/zappysys.com\/images\/SSIS-PowerPack\/ssis-logging-task.png\" alt=\"SSIS Logging Task\" width=\"50\" height=\"50\" \/><\/a><\/td>\n<td style=\"vertical-align: middle\"><a href=\"https:\/\/zappysys.com\/products\/ssis-powerpack\/ssis-logging-task-free\/\" target=\"_blank\" rel=\"noopener\">SSIS Logging Task (Free)<\/a><\/td>\n<\/tr>\n<tr style=\"line-height: 0px\">\n<td style=\"height: 58px\" width=\"50px\"><a href=\"https:\/\/zappysys.com\/products\/ssis-powerpack\/ssis-html-table-source\/\" target=\"_blank\" rel=\"noopener\"><br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3074\" src=\"https:\/\/zappysys.com\/images\/SSIS-PowerPack\/ssis-html-table-source.png\" alt=\"SSIS HTML Table Source\" width=\"50\" height=\"50\" \/><\/a><\/td>\n<td style=\"vertical-align: middle;height: 58px\"><a href=\"https:\/\/zappysys.com\/products\/ssis-powerpack\/ssis-html-table-source\/\" target=\"_blank\" rel=\"noopener\">SSIS HTML Table Source<\/a><\/td>\n<\/tr>\n<tr style=\"line-height: 0px\">\n<td style=\"height: 58px\" width=\"50px\"><a href=\"https:\/\/zappysys.com\/products\/ssis-powerpack\/ssis-file-system-task-advanced\/\" target=\"_blank\" rel=\"noopener\"><br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3074\" src=\"https:\/\/zappysys.com\/images\/SSIS-PowerPack\/ssis-file-system-task-advanced.png\" alt=\"Advanced SSIS File System Task \" width=\"50\" height=\"50\" \/><\/a><\/td>\n<td style=\"vertical-align: middle;height: 58px\"><a href=\"https:\/\/zappysys.com\/products\/ssis-powerpack\/ssis-file-system-task-advanced\/\" target=\"_blank\" rel=\"noopener\">Advanced SSIS File System Task<br \/>\n<\/a><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>Finally, we will show how to read data from a SQL Server query and store into an HTML file. We will use the Execute SQL Task combined with the <a href=\"https:\/\/zappysys.com\/products\/ssis-powerpack\/ssis-logging-task-free\/\">ZS SSIS Logging Task<\/a>.<\/p>\n<h2 style=\"text-align: left\">Requirements<\/h2>\n<ol>\n<li>First, you will need SSDT installed.<\/li>\n<li>Secondly, <a href=\"https:\/\/zappysys.com\/products\/ssis-powerpack\/\">ZappySys PowerPack for SSIS.<\/a><\/li>\n<li>Finally, SQL Server installed.<\/li>\n<\/ol>\n<h2>Getting started<\/h2>\n<h3>How to save the list of system files into SQL an HTML table<\/h3>\n<p>In the first example, we will use our ZappySys Advanced File System to copy a list of the system files in a folder. This list of files will be stored in an object variable and then we will save to a file.<\/p>\n<ol>\n<li>In the first place, we will use the Advanced File System Task and select the Get file list ADO.net DataTable action. We will list the files of the c:\\sql folder and save the results into a variable:\n<div id=\"attachment_3597\" style=\"width: 693px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/list-of-files.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-3597\" class=\"size-full wp-image-3597\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/list-of-files.jpg\" alt=\"SSIS list files\" width=\"683\" height=\"633\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/list-of-files.jpg 683w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/list-of-files-300x278.jpg 300w\" sizes=\"(max-width: 683px) 100vw, 683px\" \/><\/a><p id=\"caption-attachment-3597\" class=\"wp-caption-text\">SSIS list files<\/p><\/div><\/li>\n<li>In addition, we will create a variable of type object named listfiles that will store the files information:\n<div id=\"attachment_3599\" style=\"width: 492px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/ssis-object-data-type.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-3599\" class=\"size-full wp-image-3599\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/ssis-object-data-type.jpg\" alt=\"SSIS object variable\" width=\"482\" height=\"380\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/ssis-object-data-type.jpg 482w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/ssis-object-data-type-300x237.jpg 300w\" sizes=\"(max-width: 482px) 100vw, 482px\" \/><\/a><p id=\"caption-attachment-3599\" class=\"wp-caption-text\">SSIS object variable<\/p><\/div><\/li>\n<li>Also, we will use the ZS Logging Tasks and join with the ZS Advanced File. The ZS Logging Task will be used to store the variable into a file:\n<div id=\"attachment_3600\" style=\"width: 333px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/ssis-list-files-folder-save-to-variable.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-3600\" class=\"size-full wp-image-3600\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/ssis-list-files-folder-save-to-variable.jpg\" alt=\"SSIS object variable\" width=\"323\" height=\"205\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/ssis-list-files-folder-save-to-variable.jpg 323w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/ssis-list-files-folder-save-to-variable-300x190.jpg 300w\" sizes=\"(max-width: 323px) 100vw, 323px\" \/><\/a><p id=\"caption-attachment-3600\" class=\"wp-caption-text\">SSIS save variable to HTML<\/p><\/div><\/li>\n<li>In addition, it is possible to send the variable values into the Execution Log (SSIS output), to a file, to a MessageBox:\n<div id=\"attachment_3601\" style=\"width: 635px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/ssis-output-variable-to-log-messagebo-file-variable.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-3601\" class=\"wp-image-3601 size-full\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/ssis-output-variable-to-log-messagebo-file-variable.jpg\" alt=\"ssis output variable to log messagebo file variable\" width=\"625\" height=\"504\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/ssis-output-variable-to-log-messagebo-file-variable.jpg 625w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/ssis-output-variable-to-log-messagebo-file-variable-300x242.jpg 300w\" sizes=\"(max-width: 625px) 100vw, 625px\" \/><\/a><p id=\"caption-attachment-3601\" class=\"wp-caption-text\">SSIS output variable to log,\u00a0message box and file variable to read and write data to HTML in SSIS<\/p><\/div><\/li>\n<li>In this example, we will show the values into an HTML file named listfiles.html\n<div id=\"attachment_3626\" style=\"width: 635px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/ssis-save-variable-into-html.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-3626\" class=\"size-full wp-image-3626\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/ssis-save-variable-into-html.jpg\" alt=\"ssis save variable into html\" width=\"625\" height=\"504\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/ssis-save-variable-into-html.jpg 625w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/ssis-save-variable-into-html-300x242.jpg 300w\" sizes=\"(max-width: 625px) 100vw, 625px\" \/><\/a><p id=\"caption-attachment-3626\" class=\"wp-caption-text\">SSIS save variable iHTMLhtml<\/p><\/div><\/li>\n<li>After executing the package, you will be able to see the HTML with a list of files, names, size, modification and creation information:\n<div id=\"attachment_3627\" style=\"width: 1350px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/ssis-list-files-1.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-3627\" class=\"size-full wp-image-3627\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/ssis-list-files-1.jpg\" alt=\"SSIS list files\" width=\"1340\" height=\"470\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/ssis-list-files-1.jpg 1340w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/ssis-list-files-1-300x105.jpg 300w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/ssis-list-files-1-768x269.jpg 768w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/ssis-list-files-1-1024x359.jpg 1024w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/ssis-list-files-1-1080x380.jpg 1080w\" sizes=\"(max-width: 1340px) 100vw, 1340px\" \/><\/a><p id=\"caption-attachment-3627\" class=\"wp-caption-text\">ssis list files<\/p><\/div><\/li>\n<\/ol>\n<h3>How to copy data from an HTML table to SQL Server<\/h3>\n<p>The next example will save data from a file named listfiles.html created in the previous example with an HTML table. The example will export the table to SQL Server. However, with our HTML Table Source, you can export to any destination.<\/p>\n<ol>\n<li>In order to start, we will Drag and drop a data flow task and double click it:\n<div id=\"attachment_3605\" style=\"width: 540px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/ssis-data-flow.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-3605\" class=\"size-full wp-image-3605\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/ssis-data-flow.jpg\" alt=\"ssis data flow\" width=\"530\" height=\"178\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/ssis-data-flow.jpg 530w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/ssis-data-flow-300x101.jpg 300w\" sizes=\"(max-width: 530px) 100vw, 530px\" \/><\/a><p id=\"caption-attachment-3605\" class=\"wp-caption-text\">SSIS data flow<\/p><\/div><\/li>\n<li>Next, in the Data Flow task, use the HTML Table Source and join to the OLEDB Destination:\n<div id=\"attachment_3606\" style=\"width: 352px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/ssis-html-table-to-oledb.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-3606\" class=\"size-full wp-image-3606\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/ssis-html-table-to-oledb.jpg\" alt=\"ssis html table to oledb\" width=\"342\" height=\"221\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/ssis-html-table-to-oledb.jpg 342w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/ssis-html-table-to-oledb-300x194.jpg 300w\" sizes=\"(max-width: 342px) 100vw, 342px\" \/><\/a><p id=\"caption-attachment-3606\" class=\"wp-caption-text\">SSIS HTML table SQL server<\/p><\/div><\/li>\n<li>Also, in URLs enter the path of the HTML file created in the first example:\n<div id=\"attachment_3607\" style=\"width: 811px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/ssis-html-table-read.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-3607\" class=\"size-full wp-image-3607\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/ssis-html-table-read.jpg\" alt=\"ssis html table read\" width=\"801\" height=\"593\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/ssis-html-table-read.jpg 801w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/ssis-html-table-read-300x222.jpg 300w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/ssis-html-table-read-768x569.jpg 768w\" sizes=\"(max-width: 801px) 100vw, 801px\" \/><\/a><p id=\"caption-attachment-3607\" class=\"wp-caption-text\">SSIS HTML table read<\/p><\/div><\/li>\n<li>In addition, go to the OLEDB Source, specify the SQL Server name, database, and log in to it.<br \/>\nIn the name of table or view press new to create a new table:<\/p>\n<pre class=\"lang:tsql decode:true \">CREATE TABLE [dbo.listfiles] (\r\n[_rowNumber] int,\r\n[_groupName] nvarchar(255),\r\n[FullPath] nvarchar(255),\r\n[Name] nvarchar(255),\r\n[Size] int,\r\n[AgeInDays] int,\r\n[LastEditInDays] int,\r\n[LastModifiedDate] datetime,\r\n[CreationDate] datetime,\r\n[LastModifiedDateUtc] datetime,\r\n[CreationDateUtc] datetime,\r\n[Extension] nvarchar(255),\r\n[IsReadOnly] nvarchar(255),\r\n[FolderPath] nvarchar(255)\r\n)<\/pre>\n<div id=\"attachment_3608\" style=\"width: 834px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/ssis-oledb-create-table.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-3608\" class=\"size-full wp-image-3608\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/ssis-oledb-create-table.jpg\" alt=\"ssis oledb create table\" width=\"824\" height=\"719\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/ssis-oledb-create-table.jpg 824w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/ssis-oledb-create-table-300x262.jpg 300w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/ssis-oledb-create-table-768x670.jpg 768w\" sizes=\"(max-width: 824px) 100vw, 824px\" \/><\/a><p id=\"caption-attachment-3608\" class=\"wp-caption-text\">SSIS OLEDB\u00a0create table<\/p><\/div><\/li>\n<li>Also, go to Mappings page to map all the columns.\n<div id=\"attachment_3609\" style=\"width: 834px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/ssis-map-columns.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-3609\" class=\"size-full wp-image-3609\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/ssis-map-columns.jpg\" alt=\"ssis map columns\" width=\"824\" height=\"663\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/ssis-map-columns.jpg 824w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/ssis-map-columns-300x241.jpg 300w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/ssis-map-columns-768x618.jpg 768w\" sizes=\"(max-width: 824px) 100vw, 824px\" \/><\/a><p id=\"caption-attachment-3609\" class=\"wp-caption-text\">SSIS map columns<\/p><\/div><\/li>\n<li>Finally, run the package and you will have all the data exported.<\/li>\n<\/ol>\n<h3>How to export SQL Server results to an HTML in SSIS<\/h3>\n<p>The following example will show how to export the results of an SQL query into an HTML file.<\/p>\n<ol>\n<li>In order to start, we will use the Execute SQL Task. Specify the option Full result set and create an OLEDB connection specifying the Server Name, database name and the select statement to a table:\n<div id=\"attachment_3611\" style=\"width: 747px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/ssis-sql-results.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-3611\" class=\"size-full wp-image-3611\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/ssis-sql-results.jpg\" alt=\"ssis sql results\" width=\"737\" height=\"631\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/ssis-sql-results.jpg 737w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/ssis-sql-results-300x257.jpg 300w\" sizes=\"(max-width: 737px) 100vw, 737px\" \/><\/a><p id=\"caption-attachment-3611\" class=\"wp-caption-text\">SSIS SQL query results<\/p><\/div><\/li>\n<li>Secondly, go to the Result Set page and in the Result Name, set 0 and in Variable name, create a new variable:\n<div id=\"attachment_3612\" style=\"width: 745px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/ssis-sql-result-to-variable-1.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-3612\" class=\"size-full wp-image-3612\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/ssis-sql-result-to-variable-1.jpg\" alt=\"ssis sql result to variable\" width=\"735\" height=\"228\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/ssis-sql-result-to-variable-1.jpg 735w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/ssis-sql-result-to-variable-1-300x93.jpg 300w\" sizes=\"(max-width: 735px) 100vw, 735px\" \/><\/a><p id=\"caption-attachment-3612\" class=\"wp-caption-text\">ssis sql result to variable<\/p><\/div><\/li>\n<li>Also, create a variable of type object:\n<div id=\"attachment_3613\" style=\"width: 492px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/ssis-object-data-type-1.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-3613\" class=\"size-full wp-image-3613\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/ssis-object-data-type-1.jpg\" alt=\"ssis object data type\" width=\"482\" height=\"380\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/ssis-object-data-type-1.jpg 482w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/ssis-object-data-type-1-300x237.jpg 300w\" sizes=\"(max-width: 482px) 100vw, 482px\" \/><\/a><p id=\"caption-attachment-3613\" class=\"wp-caption-text\">SSIS object data type<\/p><\/div><\/li>\n<li>Finally, use the ZS Logging Task to save the results in a File. Specify the Log file path and insert the variable:\n<div id=\"attachment_3614\" style=\"width: 635px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/ssis-save-to-html-file.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-3614\" class=\"wp-image-3614 size-full\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/ssis-save-to-html-file.jpg\" alt=\"ssis save to html file to export data to read and write data to HTML in SSIS\" width=\"625\" height=\"504\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/ssis-save-to-html-file.jpg 625w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/ssis-save-to-html-file-300x242.jpg 300w\" sizes=\"(max-width: 625px) 100vw, 625px\" \/><\/a><p id=\"caption-attachment-3614\" class=\"wp-caption-text\">SSIS save to HTML file<\/p><\/div><\/li>\n<\/ol>\n<h2>Conclusion about\u00a0read and write data to HTML in SSIS<\/h2>\n<p>To conclude, in this article, we learned how to export a list of files system properties and names to SQL Server. How to read an HTML table to SQL Server and finally how to export SQL Server results to an HTML in SSIS. There are nice tools to read and write data to HTML in SSIS<\/p>\n<p>If you liked the tools, you can download them <a href=\"https:\/\/zappysys.com\/products\/ssis-powerpack\/download\/\">HERE.<\/a><\/p>\n<h2>References<\/h2>\n<ul>\n<li><a href=\"https:\/\/zappysys.com\/products\/ssis-powerpack\/\">SSIS PowerPack ZappySys<\/a><\/li>\n<li><a href=\"https:\/\/docs.microsoft.com\/en-us\/sql\/integration-services\/integration-services-ssis-variables?view=sql-server-2017\">Integration Services (SSIS) Variables<\/a><\/li>\n<li><a href=\"https:\/\/docs.microsoft.com\/en-us\/sql\/integration-services\/control-flow\/execute-sql-task?view=sql-server-2017\">Execute SQL Task<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Introduction to read and write data to HTML in SSIS In this article, we will show how to send values from an SSIS Variable to an HTML file. We will use the SSIS Advanced File System Task to store the list of system files of a folder into a variable and then we will use [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":3618,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[47,322,145],"tags":[318,316,317,283,12,239],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\r\n<title>How to read and write data to HTML in SSIS | ZappySys Blog<\/title>\r\n<meta name=\"description\" content=\"In this article, we will show how to read and write data to HTML in SSIS using variables to get values from a variable to a file using the ZS logging task\" \/>\r\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\r\n<link rel=\"canonical\" href=\"https:\/\/zappysys.com\/blog\/read-and-write-data-to-html-in-ssis\/\" \/>\r\n<meta property=\"og:locale\" content=\"en_US\" \/>\r\n<meta property=\"og:type\" content=\"article\" \/>\r\n<meta property=\"og:title\" content=\"How to read and write data to HTML in SSIS | ZappySys Blog\" \/>\r\n<meta property=\"og:description\" content=\"In this article, we will show how to read and write data to HTML in SSIS using variables to get values from a variable to a file using the ZS logging task\" \/>\r\n<meta property=\"og:url\" content=\"https:\/\/zappysys.com\/blog\/read-and-write-data-to-html-in-ssis\/\" \/>\r\n<meta property=\"og:site_name\" content=\"ZappySys Blog\" \/>\r\n<meta property=\"article:published_time\" content=\"2018-05-22T22:16:51+00:00\" \/>\r\n<meta property=\"article:modified_time\" content=\"2018-05-30T14:37:19+00:00\" \/>\r\n<meta property=\"og:image\" content=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/2000px-HTML5_logo_and_wordmark.svg_.png\" \/>\r\n\t<meta property=\"og:image:width\" content=\"2000\" \/>\r\n\t<meta property=\"og:image:height\" content=\"2000\" \/>\r\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\r\n<meta name=\"author\" content=\"ZappySys Team\" \/>\r\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\r\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"ZappySys Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\r\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/zappysys.com\/blog\/read-and-write-data-to-html-in-ssis\/\",\"url\":\"https:\/\/zappysys.com\/blog\/read-and-write-data-to-html-in-ssis\/\",\"name\":\"How to read and write data to HTML in SSIS | ZappySys Blog\",\"isPartOf\":{\"@id\":\"https:\/\/zappysys.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/zappysys.com\/blog\/read-and-write-data-to-html-in-ssis\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/zappysys.com\/blog\/read-and-write-data-to-html-in-ssis\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/2000px-HTML5_logo_and_wordmark.svg_.png\",\"datePublished\":\"2018-05-22T22:16:51+00:00\",\"dateModified\":\"2018-05-30T14:37:19+00:00\",\"author\":{\"@id\":\"https:\/\/zappysys.com\/blog\/#\/schema\/person\/91b041e2dcf7ece5f068893c1a68ac6e\"},\"description\":\"In this article, we will show how to read and write data to HTML in SSIS using variables to get values from a variable to a file using the ZS logging task\",\"breadcrumb\":{\"@id\":\"https:\/\/zappysys.com\/blog\/read-and-write-data-to-html-in-ssis\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/zappysys.com\/blog\/read-and-write-data-to-html-in-ssis\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/zappysys.com\/blog\/read-and-write-data-to-html-in-ssis\/#primaryimage\",\"url\":\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/2000px-HTML5_logo_and_wordmark.svg_.png\",\"contentUrl\":\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/2000px-HTML5_logo_and_wordmark.svg_.png\",\"width\":2000,\"height\":2000,\"caption\":\"HTML icon\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/zappysys.com\/blog\/read-and-write-data-to-html-in-ssis\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/zappysys.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to read and write data to HTML in SSIS\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/zappysys.com\/blog\/#website\",\"url\":\"https:\/\/zappysys.com\/blog\/\",\"name\":\"ZappySys Blog\",\"description\":\"SSIS \/ ODBC Drivers \/ API Connectors for JSON, XML, Azure, Amazon AWS, Salesforce, MongoDB and more\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/zappysys.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/zappysys.com\/blog\/#\/schema\/person\/91b041e2dcf7ece5f068893c1a68ac6e\",\"name\":\"ZappySys Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/zappysys.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/746bec9c9d27f1b90bb181aa516ee234?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/746bec9c9d27f1b90bb181aa516ee234?s=96&d=mm&r=g\",\"caption\":\"ZappySys Team\"},\"sameAs\":[\"https:\/\/zappysys.com\"],\"url\":\"https:\/\/zappysys.com\/blog\/author\/dcalbimonte\/\"}]}<\/script>\r\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to read and write data to HTML in SSIS | ZappySys Blog","description":"In this article, we will show how to read and write data to HTML in SSIS using variables to get values from a variable to a file using the ZS logging task","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:\/\/zappysys.com\/blog\/read-and-write-data-to-html-in-ssis\/","og_locale":"en_US","og_type":"article","og_title":"How to read and write data to HTML in SSIS | ZappySys Blog","og_description":"In this article, we will show how to read and write data to HTML in SSIS using variables to get values from a variable to a file using the ZS logging task","og_url":"https:\/\/zappysys.com\/blog\/read-and-write-data-to-html-in-ssis\/","og_site_name":"ZappySys Blog","article_published_time":"2018-05-22T22:16:51+00:00","article_modified_time":"2018-05-30T14:37:19+00:00","og_image":[{"width":2000,"height":2000,"url":"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/2000px-HTML5_logo_and_wordmark.svg_.png","type":"image\/png"}],"author":"ZappySys Team","twitter_card":"summary_large_image","twitter_misc":{"Written by":"ZappySys Team","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/zappysys.com\/blog\/read-and-write-data-to-html-in-ssis\/","url":"https:\/\/zappysys.com\/blog\/read-and-write-data-to-html-in-ssis\/","name":"How to read and write data to HTML in SSIS | ZappySys Blog","isPartOf":{"@id":"https:\/\/zappysys.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/zappysys.com\/blog\/read-and-write-data-to-html-in-ssis\/#primaryimage"},"image":{"@id":"https:\/\/zappysys.com\/blog\/read-and-write-data-to-html-in-ssis\/#primaryimage"},"thumbnailUrl":"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/2000px-HTML5_logo_and_wordmark.svg_.png","datePublished":"2018-05-22T22:16:51+00:00","dateModified":"2018-05-30T14:37:19+00:00","author":{"@id":"https:\/\/zappysys.com\/blog\/#\/schema\/person\/91b041e2dcf7ece5f068893c1a68ac6e"},"description":"In this article, we will show how to read and write data to HTML in SSIS using variables to get values from a variable to a file using the ZS logging task","breadcrumb":{"@id":"https:\/\/zappysys.com\/blog\/read-and-write-data-to-html-in-ssis\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/zappysys.com\/blog\/read-and-write-data-to-html-in-ssis\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/zappysys.com\/blog\/read-and-write-data-to-html-in-ssis\/#primaryimage","url":"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/2000px-HTML5_logo_and_wordmark.svg_.png","contentUrl":"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/05\/2000px-HTML5_logo_and_wordmark.svg_.png","width":2000,"height":2000,"caption":"HTML icon"},{"@type":"BreadcrumbList","@id":"https:\/\/zappysys.com\/blog\/read-and-write-data-to-html-in-ssis\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/zappysys.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to read and write data to HTML in SSIS"}]},{"@type":"WebSite","@id":"https:\/\/zappysys.com\/blog\/#website","url":"https:\/\/zappysys.com\/blog\/","name":"ZappySys Blog","description":"SSIS \/ ODBC Drivers \/ API Connectors for JSON, XML, Azure, Amazon AWS, Salesforce, MongoDB and more","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/zappysys.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/zappysys.com\/blog\/#\/schema\/person\/91b041e2dcf7ece5f068893c1a68ac6e","name":"ZappySys Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/zappysys.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/746bec9c9d27f1b90bb181aa516ee234?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/746bec9c9d27f1b90bb181aa516ee234?s=96&d=mm&r=g","caption":"ZappySys Team"},"sameAs":["https:\/\/zappysys.com"],"url":"https:\/\/zappysys.com\/blog\/author\/dcalbimonte\/"}]}},"_links":{"self":[{"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/posts\/3584"}],"collection":[{"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/comments?post=3584"}],"version-history":[{"count":23,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/posts\/3584\/revisions"}],"predecessor-version":[{"id":3739,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/posts\/3584\/revisions\/3739"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/media\/3618"}],"wp:attachment":[{"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/media?parent=3584"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/categories?post=3584"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/tags?post=3584"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}