I found this script that will loop through .csv files and combine them into one Excel worksheet. I then created a second script to call this one with the following:
echo "Combining .csv files into Excel workbook"
C:\PowerShell\ConvertCSVtoExcel.ps1
Get-ChildItem *.csv | ConvertCSV-ToExcel -output ePortalMontlyReport.xlsx
echo " "
But when I try to run the script, I am getting the following error:
ConvertCSV-ToExcel : The term 'ConvertCSV-ToExcel' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At C:\PowerShell\Merge.ps1:3 char:23 + Get-ChildItem *.csv | ConvertCSV-ToExcel -output ePortalMontlyReport. ... + ~~~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (ConvertCSV-ToExcel:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException
Any suggestions on how to resolve this?