Below is the script:
$SourceFile = "C:\temp\kalyan.txt"
$File = Get-Content $SourceFile
Can someone help me on how to get tabular format.
My text file contains below:
You'd have to write a custom function to turn the inputted text back into powershell objects. I suspect that you are generating the text file with powershell. If that is the case, you can build the html from wherever you got the original data from. So, how is the text file generated?
Would something like this work for you:
Import-Csv $SourceFile | Select-Object -Property * | ConvertTo-Html -Title "Running Stausk" | Out-File $TargetFile
You must be logged in to reply to this topic.