This file contains hidden or 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
// Ugly one-liner: type is in the middle of the line, implementation takes less than half a line | |
// Pain! | |
implicit class RichSsWorkbook(wb: Workbook) { | |
def apply(i: Int): Sheet = wb.getSheetAt(i) | |
def bytes: Array[Byte] = { | |
val baos = new ByteArrayOutputStream | |
wb.write(baos) | |
baos.toByteArray | |
} |
This file contains hidden or 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
/** | |
* Entity representing mapping of comp proposal from XLS column names. | |
* | |
* @author FS | |
*/ | |
// Please preserve attribute order when defining a new mapping | |
class ProposalMapping( | |
// Date | |
val executionDate: Option[String], | |
val commencementDate: Option[String], |
This file contains hidden or 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
new ProposalMapping( | |
executionDate = None, | |
commencementDate = None, | |
expirationDate = None, | |
freeMonths = None, | |
leaseTerm = None | |
) | |
new ProposalMapping( |
NewerOlder