On one hand I have coded a function in Scala that reads Excel Files. On the other I have different formats of reports: The first report will output certain informations, the second one will sum a few cells according to defined rules.
I struggle to model how those objects will interact together. What i have done for the moment is that the ExcelReader will take two arguments: a file input (filestream) and a trait for reports.
I was thinking to inject the report class and use the commmon trait createReport in the Excel Reader. Is it a good practice?
My other question is which object should i pass to this createReport method. Is it better to pass a List? an Array? I am not too sure which is the best object to model an excel sheet or if it is better to create my own object.
Thank you
Regards
What do you interpret from Excel? It can be quite complex I guess, but for start you could try: