Shane O’Neill has a new cmdlet for us:
Don’t get me wrong – I’m aware that you don’t need Excel installed on the computer where you’re running these commands from. You still need to save the files somewhere though. The function doesn’t take data from variables.
I can use dbatools and
Write-DbaDbTableData. This function is not dependent on the table having to already exist. It will create the table for you if you tell it to. Thank you
-AutoCreateTable; even though I recommend pre-sizing your columns if you want to go with this method.
However, I don’t want to have to create the table beforehand.
Click through to check it out and grab a copy for yourself.