Last active
September 14, 2020 07:15
-
-
Save fish8/d637d26f3502d3c7e6d2e1b96364754d to your computer and use it in GitHub Desktop.
command line excel, csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#to csv | |
#via csvkit | |
in2csv --sheet 区县级 基站工参统计.xlsx #to stdout | |
# via Gnumeric | |
ssconvert -T Gnumeric_stf:stf_csv 基站工参统计.xlsx | |
#select columns | |
in2csv --sheet 区县级 基站工参统计.xlsx |csvcut -c "城市名称","人数" | |
#find rows with matching regex | |
csvgrep -c phone_number -r "555-555-\d{4}" data.csv > new.csv | |
#csv with sql | |
csvsql --query "select name from data where age > 30" data.csv > new.csv |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment