I have 2D array $dates with 2 columns and multiple rows for example:
$dates[0][0] = 2016.07.20
$dates[0][1] = 1
$dates[1][0] = 2016.08.19
$dates[1][1] = 6
...
I need to add this array to html output as table. For example I have style of html table:
$a = "<style>"
$a = $a + "TABLE{border-width: 2px;border-style: solid;border-color: black;border-collapse: collapse;}"
$a = $a + "TD{border-width: 1px;padding: 0px;border-style: solid;border-color: black;}"
$a = $a + "</style>"
When i use:
$dates | Select @{expression={$_}}| ConvertTo-HTML -head $a | out-file "C:\Test.htm"
I get this output, where they are in the same column:
<tr><td>2016.07.20 1</td></tr>
<tr><td>2016.08.19 6</td></tr>
<tr><td>2016.08.20 6</td></tr>
I need to have values be in different columns:
<tr><td>2016.07.20</td><td>1</td></tr>
<tr><td>2016.08.19</td><td>6</td></tr>
<tr><td>2016.08.20</td><td>6</td></tr>
Unfortunately I was unable to find examples how to fix that. Please can anyone help? How I can add values in different columns?
$dateshave? Is it just space-separated strings? Objects from a csv?