Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • C csvkit
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 61
    • Issues 61
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 4
    • Merge requests 4
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • wireservice
  • csvkit
  • Issues
  • #804
Closed
Open
Issue created Feb 27, 2017 by Administrator@rootContributor

in2csv: Specify inputs and outputs for Excel sheets using patterns and regular expressions

Created by: malcook

possible CLI interface:

  • extend csvsql's current --sheet option to allow specifying multiple sheets by name using a regular expression defaulting to '*' which matches all sheets (and possibly also by index, using 'i..j,k..l' syntax).
  • support detecting and taking input from excel in csvsql and implement --sheet similarly as above
  • extend --tables option as --tables TABLE_NAMES Specify the names of the tables to be created. The following "replacement strings" are supported {} : pathname passed to the command {.} : pathname without final extension {#} : the sheetname being processed, (only allowed for Excel input) The default TABLE_NAMES is '{.}' for non-excel input, and '{.}_{#}' for excel input. Providing --tables='{#}' will name tables after sheets alone.
  • new option to in2csv, --files with similar "replacement string" processing, and a default value of '{.}_{#}.csv'

A useful way to extract all sheets from an excel workbook, say ${w}, into a directory named after the workbook, with files named after the sheets would then be:

mkdir ${w}.d
in2csv ${w} --files "${w}.d/{#}.csv"

The "replacement strings" are borrowed from "GNU Parallel' (except '{#}' which I made up) and there are a few more you might like, if you like this idea.

Assignee
Assign to
Time tracking