Created
October 13, 2018 23:42
-
-
Save ciferkey/e24267a779c53de742a4dda51da45341 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun workbook(wb: Workbook = HSSFWorkbook(), block: Workbook.() -> Unit = {}): Workbook { | |
block(wb) | |
return wb | |
} | |
fun tryItOut() { | |
// use the default HSSFWorkbook | |
workbook { | |
} | |
// use the provided XSSFWorkbook | |
workbook(XSSFWorkbook()) { | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment