Skip to content

Instantly share code, notes, and snippets.

@ciferkey
Created October 14, 2018 00:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ciferkey/c10b422d1a464619a09d5a822e6ce2e2 to your computer and use it in GitHub Desktop.
Save ciferkey/c10b422d1a464619a09d5a822e6ce2e2 to your computer and use it in GitHub Desktop.
fun Workbook.sheet(name: String? = null, block: Sheet.() -> Unit = {}): Sheet {
return if (name != null) {
createSheet(name)
} else {
createSheet()
}.apply(block)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment