Sign inSign up

mguzelevich/xlsxcli

By mguzelevich

•Updated over 3 years ago

command line tool for `.xlsx` files processing

Image
0

2.8K

mguzelevich/xlsxcli repository overview

⁠xlsx-tools

command line tool for .xlsx files processing

⁠Mapping file

ID,#,№,Numer,N
Name,name,username
Surname,SecondName,second

⁠Makefile

.PHONY: run test clean

exec_root = $(shell pwd)
ts = $(shell date +%Y%m%d_%H%M%S)
short_ts = $(shell date +%Y%m%d)

XLSXCLI_IMAGE = mguzelevich/xlsxcli

prepare:
	echo "prepare"

run: input_file = input.xlsx
run: output_file = output.csv
run: mapping_file = mapping.csv
run: prepare
	docker run -it --rm \
      -v "${exec_root}":/project \
	  ${XLSXCLI_IMAGE} \
	    sh -c '/xlsx --mapping "/project/${mapping_file}" --mode=one2one "/project/${input_file}" > /project/${output_file}'

⁠usage

$ make run

⁠modes

  • one2many - 1 csv for every xlsx sheet
  • one2one - 1 csv for all xlsx sheets

⁠examples

$ xlsxcli -mode one2many -mapping mapping.csv input.xlsx

Tag summary

Content type

Image

Digest

sha256:2724b7dfd…

Size

5.6 MB

Last updated

over 3 years ago

docker pull mguzelevich/xlsxcli