0

Pretty new to to powershell and coding in general, dabbled a bit here and there and would like to try creating my own organized files.

I have an excel sheet(xls) from which I need certain rows and have them output to a txt file , line by line while the spaces between the numbers are replaced by commas, atm due to various limitations I can use powershell.

e.g.

input: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |

output(in txt file):

1,2,3,4,5,6,7,8

I tried converting to csv and then tried to find the right commands to have powershell read it but I got lost on the way a havent had any luck finding what I need

Filburt
  • 17,626
  • 12
  • 64
  • 115
  • Assuming you have Excel installed, you can use excel interop so you dont need to convert to CSV first https://stackoverflow.com/a/19214744/212869 . If you don't have access to that you can use `Import-CSV` to read your data. – NickSlash May 15 '23 at 11:47
  • 1
    It's unclear what you're trying to achieve or what you're having difficulty with. Please [edit] your post to clarify. Please also read about [how to ask a good question](http://stackoverflow.com/help/how-to-ask). – mklement0 May 15 '23 at 21:39

0 Answers0