#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2017
    Posts
    2
    Rep Power
    0

    how to convert a text file into csv file in perl


    i have a ":" separated text file that i have to convert into excel sheet
    how can i do that??
    my file in in this format
    1.0:aaaaa
    2.0:bbbbb
    5.2:cccc

    i want it in an excel sheet
    1.0 aaaaaa
    2.0 bbbbbb

    can someone please help
  2. #2
  3. Lazy Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    16,383
    Rep Power
    9645
    Copy and paste into Excel, select all, use Text to Columns to split on the colon.

    If you need an automatic method, replace the colons with tabs and give the file a .tsv ("tab-separated values") extension. Excel can open those too.

IMN logo majestic logo threadwatch logo seochat tools logo