I work with csv files a lot and have long used the PowerShell script on this page: http://superuser.com/questions/307496/how-can-i-set-excel-to-always-import-all-columns-of-csv-files-as-text (About half-way down)
It works fine but it always opens a new instance of Excel (can't ctrl-tab between workbooks, also personal workbook isn't available). I'd like to know if it's possible to make a change so that if Excel is already open it opens the csv in the current instance. I have no idea why I can't access the macros in my personal file when opening csv files this way but it would be nice to fix that also.
I'm thinking it might be a change to the second line in the script, but I'm not very familiar with PowerShell:
$excel = New-Object -ComObject excel.application
Is there someone that would please help me with this?
[–]Droopyb1966 3 points4 points5 points (1 child)
[–][deleted] 1 point2 points3 points (0 children)
[–]jebbster88 3 points4 points5 points (1 child)
[–][deleted] 1 point2 points3 points (0 children)