Philipp Bayer on Nostr: Here's a weird hack I've been doing lots of work in WSL2 and sometimes I just want to ...
Here's a weird hack
I've been doing lots of work in WSL2 and sometimes I just want to copy-paste some intermediate data into Excel to play around a bit.
BUT WSL2 converts tabs into heaps spaces, so you just can't copy-paste into Excel as Excel will mix up tabs and spaces and the tabular format is gone.
'Solution': sed 's/\t/ö/g'
to replace all tabs by ö.
Then use Excel's Text to Columns function with ö as delimiter.
Voila.
I've been doing lots of work in WSL2 and sometimes I just want to copy-paste some intermediate data into Excel to play around a bit.
BUT WSL2 converts tabs into heaps spaces, so you just can't copy-paste into Excel as Excel will mix up tabs and spaces and the tabular format is gone.
'Solution': sed 's/\t/ö/g'
to replace all tabs by ö.
Then use Excel's Text to Columns function with ö as delimiter.
Voila.