View Single Post
  #1  
Old 04-25-2016, 06:13 PM
jdev's Avatar
jdev jdev is offline
VanDyke Technical Support
 
Join Date: Nov 2003
Location: Albuquerque, NM
Posts: 937
Example: Save Selected Text To CSV File

You may have a scenario where there are columns of data (space-separated) on the screen, and you want to get that data into a CSV file for work in Excel. This script shows how you can take space-delimited columns of text selected in SecureCRT's terminal screen and save it to a CSV file, converting the spaces to commas.

One suggestion would be to map this script to a Run Script button on SecureCRT's button bar. Then, whenever needed, simply select the data & then press the button to run the script to save the selected data to a CSV file for you, prompting you for the filename (filling in a sensible default), and then automatically bringing up the CSV file for view in the default system app.

Remember that holding down the Alt key while selecting text allows you to select in "Column Mode", so that you can even eliminate unwanted columns prior to having the data saved, if you only want a subset of the columns saved to the CSV file.

--Jake
Attached Files
File Type: txt SaveSelectedTextToCSVFile.vbs.txt (5.1 KB, 1053 views)
__________________
Jake Devenport
VanDyke Software
Technical Support
YouTube Channel: https://www.youtube.com/vandykesoftware
Email: support@vandyke.com
Web: https://www.vandyke.com/support