Author: centic
Date: Sat Nov 30 09:29:43 2024
New Revision: 1922229
URL: http://svn.apache.org/viewvc?rev=1922229&view=rev
Log:
Groovy script example: Use latest POI and fix to run again
Fix path to test-file
Fix changed constants
Add settings.gradle
Adjust Rat exclusions
Added:
poi/trunk/poi-examples/src/main/groovy/settings.gradle
Modified:
poi/trunk/build.gradle
poi/trunk/poi-examples/src/main/groovy/SpreadSheetDemo.groovy
poi/trunk/poi-examples/src/main/groovy/build.gradle
Modified: poi/trunk/build.gradle
URL:
http://svn.apache.org/viewvc/poi/trunk/build.gradle?rev=1922229&r1=1922228&r2=1922229&view=diff
==============================================================================
--- poi/trunk/build.gradle (original)
+++ poi/trunk/build.gradle Sat Nov 30 09:29:43 2024
@@ -708,7 +708,9 @@ rat {
"osgi/README.md",
"src/resources/ooxml-lite-report.*",
// ignore svn conflict artifacts
- "**/module-info.*"
+ "**/module-info.*",
+ "poi-examples/src/main/groovy/settings.gradle",
+ "poi-examples/src/main/groovy/.gradle/**"
]
/*
Modified: poi/trunk/poi-examples/src/main/groovy/SpreadSheetDemo.groovy
URL:
http://svn.apache.org/viewvc/poi/trunk/poi-examples/src/main/groovy/SpreadSheetDemo.groovy?rev=1922229&r1=1922228&r2=1922229&view=diff
==============================================================================
--- poi/trunk/poi-examples/src/main/groovy/SpreadSheetDemo.groovy (original)
+++ poi/trunk/poi-examples/src/main/groovy/SpreadSheetDemo.groovy Sat Nov 30
09:29:43 2024
@@ -36,7 +36,7 @@ WorkbookFactory.create(f,null,true).with
def sheet = workbook.getSheetAt(sheetNum)
sheet.each { row ->
- def nonEmptyCells = row.grep { c -> c.getCellType() !=
Cell.CELL_TYPE_BLANK }
+ def nonEmptyCells = row.grep { c -> c.getCellType() != CellType.BLANK
}
println " Row ${row.getRowNum()} has ${nonEmptyCells.size()}
non-empty cells:"
nonEmptyCells.each { c ->
def cRef = [c] as CellReference
@@ -52,7 +52,7 @@ WorkbookFactory.create(f,null,true).with
ns1.createRow(1).createCell(0).setCellValue("TODO - Populate with data")
Sheet ns2 = workbook.createSheet("Generated 2")
- exportHeader(ns2, headerStyle, "This is a demo sheet",
+ exportHeader(ns2, headerStyle, "This is a demo sheet",
["ID","Title","Date","Author","Num"] as String[])
ns2.createRow(2).createCell(0).setCellValue(1)
ns2.createRow(3).createCell(0).setCellValue(4)
Modified: poi/trunk/poi-examples/src/main/groovy/build.gradle
URL:
http://svn.apache.org/viewvc/poi/trunk/poi-examples/src/main/groovy/build.gradle?rev=1922229&r1=1922228&r2=1922229&view=diff
==============================================================================
--- poi/trunk/poi-examples/src/main/groovy/build.gradle (original)
+++ poi/trunk/poi-examples/src/main/groovy/build.gradle Sat Nov 30 09:29:43 2024
@@ -21,10 +21,11 @@ apply plugin: 'groovy'
repositories {
mavenCentral()
}
+
dependencies {
- compile 'org.codehaus.groovy:groovy-all:2.4.21'
- compile 'org.apache.poi:poi:5.2.1'
- compile 'org.apache.poi:poi-ooxml:5.2.1'
+ implementation 'org.codehaus.groovy:groovy-all:2.4.21'
+ implementation 'org.apache.poi:poi:5.3.0'
+ implementation 'org.apache.poi:poi-ooxml:5.3.0'
}
// Our files are in the current directory
@@ -38,6 +39,6 @@ tasks.withType(JavaExec) {
}
task runScript(type: JavaExec) {
mainClass = "SpreadSheetDemo"
- args = ["../../../test-data/spreadsheet/Simple.xls"]
+ args = ["../../../../test-data/spreadsheet/Simple.xls"]
}
defaultTasks 'runScript'
Added: poi/trunk/poi-examples/src/main/groovy/settings.gradle
URL:
http://svn.apache.org/viewvc/poi/trunk/poi-examples/src/main/groovy/settings.gradle?rev=1922229&view=auto
==============================================================================
--- poi/trunk/poi-examples/src/main/groovy/settings.gradle (added)
+++ poi/trunk/poi-examples/src/main/groovy/settings.gradle Sat Nov 30 09:29:43
2024
@@ -0,0 +1 @@
+// empty file required to have a standalone build
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]