kktec / gsheets Goto Github PK
View Code? Open in Web Editor NEWThis project forked from andresteingress/gsheets
Groovy DSL wrapper for Apache POI
This project forked from andresteingress/gsheets
Groovy DSL wrapper for Apache POI
Calling
parser.grid {
startRowIndex = 1
maxRows = 1
columns name: 'string', date:'date', count: 'int', value:'decimal', active: 'boolean'
}
on a WorkbookParser created on a workbook visiting the parsing_demo.xlsx
at top of gsheets sources, will give the 3 lines of sheet instead of only the line with name 'a'.
Strangely enough, all the spock tests where this is tested are in fact green !
I suspect that the closure strategy is maybe modified when running by spock or the this
, owner
or delegate
is different than when run outside of spock...
What I have observed is that if I change the resolveStrategy
of the closure passed to grid
to be Closure.DELEGATE_FIRST
, then I get the expected result, while if I set it to Closure.OWNER_FIRST
, the default value for new Closures, then changes to startRowIndex or maxRows are ignored.
Forcing resolveStrategy to Closure.DELETAGE_FIRST before calling closure.call()
in WorkbookParser.grid() also behaves correctly, both in spock tests and in normal context.
I can submit a pull request if you want.
This would allow parsing discrete chunks of data in a Sheet.
Should it use cell.toString() or should it only do that if the cell type is not CELL_TYPE_STRING in which case it should use stringCellValue ?
When compiling with Gradle 1.8 the following warnings are output unless the cobertura plugin and buildscript are commented out:
Script 'https://github.com/valkolovos/gradle_cobertura/raw/master/repo/gradle_cobertura/gradle_cobertura/1.0/coberturainit.gradle': line 15
The RepositoryHandler.mavenRepo() method has been deprecated and is scheduled to be removed in Gradle 2.0. Please use the maven() method instead.
Creating properties on demand (a.k.a. dynamic properties) has been deprecated and is scheduled to be removed in Gradle 2.0. Please read http://gradle.org/docs/current/dsl/org.gradle.api.plugins.ExtraPropertiesExtension.html for information on the replacement for dynamic properties.
Deprecated dynamic property: "coberturaRunner" on "root project 'gsheets'", value: "com.orbitz.gradle.cobe...".
The reportsDir property has been deprecated and is scheduled to be removed in Gradle 2.0. Please use the reporting.baseDir property instead.
The ConfigurationContainer.add() method has been deprecated and is scheduled to be removed in Gradle 2.0. Please use the create() method instead.
The TaskContainer.add() method has been deprecated and is scheduled to be removed in Gradle 2.0. Please use the create() method instead.
Some spreadsheets don't have a header row or don't have natural column names that can be assigned. For those cases it would be nice to able to access cells by a row and column index.
Does this feature exist in the code? (I looked through the tests and didn't see it)
If it does exist in the code it should be added to the unit tests, other example code and/or documentation.
Uppercase SKIP reads better as it makes it more obvious
This will allow richer reporting of errors occurring during the parsing process. Also consider creating a Grails plugin to allow using a Grails domain class constraints closure to be applied for validation.
It would be nice to have a sample/example that shows how to read localized strings from an .xls or .xlsx spreadsheet with and write them to Java properties files with names like Localization_en.properties.
It could be useful to have the same parsing API be directly useful with flat files without exporting them to a spreadsheet first
Add commands to build.gradle
and setup permission for pushing to a publicly-accessible Maven-compatible repository. Bintray is probably the best option.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.