Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,41 @@ Google Sheets are also supported indirectly (native Excel <=> Google conversion)

See the link:http://spreadsheet.dsl.builders/[Full Documentation]

== Command Line

The `spreadsheet-builder-cli` project provides a small command line wrapper around
`spreadsheet-builder-data` and `spreadsheet-builder-poi`.

Create an Excel workbook from JSON/YAML data:

[source,bash]
----
spreadsheet-builder-cli create people.yml people.xlsx
----

Query an Excel workbook with serialized JSON/YAML criteria:

[source,bash]
----
spreadsheet-builder-cli query people.xlsx query.yml
----

The query file mirrors the criteria DSL tree, so it can express workbook,
sheet, row, cell, page, and style criteria instead of a one-off filter shape:

[source,yaml]
----
sheets:
- name: People
rows:
- from: 2
to: 10
cells:
- column: C
value: Prague
----

The query command returns matching `sheets`, `rows`, and `cells` as JSON.

== Acknowledgement
This project is inspired by http://www.craigburke.com/document-builder/[Groovy Document Builder]
36 changes: 36 additions & 0 deletions libs/spreadsheet-builder-cli/spreadsheet-builder-cli.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* Copyright 2020-2026 Vladimir Orany.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
apply plugin: 'application'

dependencies {
implementation project(':spreadsheet-builder-data')
implementation project(':spreadsheet-builder-poi')
implementation "com.fasterxml.jackson.core:jackson-databind:${jacksonVersion}"
implementation "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:${jacksonVersion}"
runtimeOnly 'org.apache.logging.log4j:log4j-core:2.24.3'

testImplementation project(':spreadsheet-builder-poi')
}

application {
mainClass = 'builders.dsl.spreadsheet.cli.SpreadsheetCli'
}

jar {
manifest.attributes 'Main-Class': application.mainClass.get()
}
Loading
Loading