Skip to content

Trimming column names & values #330

@Daemach

Description

@Daemach

Discussed in #329

Originally posted by Daemach August 2, 2023
@cfsimplicity I found my first CSV file today that looks like the one below. Can spreadsheet-cfml trim column names and values? I'll have to handle the non numerics, but auto-trimming would be lovely.

 costBasisPerShare  ,purchaseDate,sedol,cusip,isin,ticker,factsetID,shares
 109.60 ,1/1/2020,,,,ABBV,,51
 110.19 ,1/1/2020,,,,ABT,,37
 117.25 ,1/1/2020,,,,AJG,,50
 138.07 ,1/1/2020,,,,AMAT,,33
 504.55 ,1/1/2020,,,,AVGO,,9
 38.12 ,1/1/2020,,,,BAC,,153
 59.61 ,1/1/2020,,,,BK,,86
 695.75 ,1/1/2020,,,,BLK,,11
 63.32 ,1/1/2020,,,,BMY,,95
 63.52 ,1/1/2020,,,,C,,57
 202.96 ,1/1/2020,,,,CAT,,40
 163.56 ,1/1/2020,,,,CCI,,30
 41.77 ,1/1/2020,,,,CFG,,67
 54.94 ,1/1/2020,,,,CMCSA,,129
 50.11 ,1/1/2020,,,,COP,,97
 50.87 ,1/1/2020,,,,CSCO,,211
 30.88 ,1/1/2020,,,,CSX,,191
 -   ,1/1/2020,,,,CVX,,90
 232.96 ,1/1/2020,,,,DHR,,18
 60.71 ,1/1/2020,,,,DOW,,125

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions