Welcome to the VanDyke Software Forums

Join the discussion today!

Go Back   VanDyke Software Forums > Scripting


Closed Thread
Thread Tools Rate Thread Display Modes
Old 04-25-2016, 05:13 PM
jdev's Avatar
jdev jdev is offline
VanDyke Technical Support
Join Date: Nov 2003
Location: Albuquerque, NM
Posts: 1,099
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.

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

example script

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -6. The time now is 06:52 PM.