Created
March 2, 2022 17:44
-
-
Save sposmen/e710a88a652d18dc13484042b98ecc3e to your computer and use it in GitHub Desktop.
Large Excel to split CSV helpers
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
# Command to convert the large Excel to csv. this is based on gnumeric | |
# To install it in Mac could be through `brew install gnumeric` | |
ssconvert -O "sheet=SHEET_NAME" EXCEL_FILENAME.xlsx CSV_FILENAME.csv | |
# Command to split the large csv in chunks of lines through parallel command. | |
# This case is 30K lines each file and each file will be numbered based on the `{#}` addition in the filename | |
# To install parallel in MAC `brew install parallel` | |
cat CSV_FILENAME.csv | parallel --header : --pipe -N30000 'cat > CSV_FILENAME_{#}.csv' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment