https://github.com/wichopy/excel-utils
A small command line utility that scans a folder for excel workbooks and combines data from sheets with the same target name into a single output.
https://github.com/wichopy/excel-utils
Last synced: over 1 year ago
JSON representation
A small command line utility that scans a folder for excel workbooks and combines data from sheets with the same target name into a single output.
- Host: GitHub
- URL: https://github.com/wichopy/excel-utils
- Owner: wichopy
- Created: 2020-04-18T01:47:47.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-04-18T02:39:16.000Z (about 6 years ago)
- Last Synced: 2023-03-08T06:54:29.632Z (over 3 years ago)
- Language: Go
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Usage
1. Download the release for your operating system
2. Open your command line of choice (Terminal, iTerm, PowerShell, etc)
3. Go to where you downloaded the file in your command line and execute the binary:
Example running with no target directory, defaulting to the directory you are running the app, and including the top row:
```
cd Downloads
./excel-merger.exe -targetSheet "Some-data" -ignoreTopRow=false
```
Example output:
```
Starting excel merger with flags: ignoreTopRow: false, targetSheet: Some-data, targetDirectory:.
Scanning files in target directory: '.'
Opening Book1 (1).xlsx
Copying data from sheet Some-data to output.
Opening Book1.xlsx
Copying data from sheet Some-data to output.
Opening output.xlsx
Cannot find target sheet 'Some-data' in file 'output.xlsx'
1210 rows copied
Saving to C:\Users\William Chou\Desktop/output.xlsx
```
Example running with a target directory and sheet, top row is ignored by default
```
./excel-merger.exe -targetDirectory "C:\Users\William Chou\Downloads" -targetSheet "Some-data"
```
Example output:
```
Starting excel merger with flags: ignoreTopRow: true, targetSheet: Some-data, targetDirectory:C:\Users\William Chou\Downloads
Scanning files in target directory: 'C:\Users\William Chou\Downloads'
Opening Book1 (1).xlsx
Copying data from sheet Some-data to output.
Opening Book1.xlsx
Copying data from sheet Some-data to output.
Opening output.xlsx
Cannot find target sheet 'Some-data' in file 'output.xlsx'
1208 rows copied
Saving to C:\Users\William Chou\Desktop/output.xlsx
```
## Dev
To set up dev env,run `go get github.com/360EntSecGroup-Skylar/excelize` to load external dep.
To run dev, `go run main.go` with any flags you need
Available flags and their defaults:
-ignoreTopRow (true)
-targetSheet (Sheet1)
-targetDirectory (.)
## Build
To build, `go build`
Since this we developed on a Mac, I added an extra script for building on windows.