I’m new to PowerShell scripting. I created a test script to convert a *.csv file from another folder and I want to save in a folder with the date. EX: c:\TEST_Convert\09072019\Convertfile_09072019.xls. Can you tell me how to add the date in the path?
First: You forgot to format your code as code. Please use the code tag button when you post code.
Second: You forgot to tell what’s not working.
You don’t need to use quotation marks around variables - sometimes that’s even counterproductive if you don’t use the right ones as you can see in your command $Workbook.SaveAs …
You may take a look at the great module from Doug Finke ImportExcel. It will make your life easier I think.
Last problem I can see: you create a variable $Worksheets but you’re never using it.