Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8534571
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T10:13:34+00:00 2026-06-11T10:13:34+00:00

On one hand I have coded a function in Scala that reads Excel Files.

  • 0

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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T10:13:36+00:00Added an answer on June 11, 2026 at 10:13 am

    What do you interpret from Excel? It can be quite complex I guess, but for start you could try:

    type ColIndex = String // maybe Int
    type RowIndex = Int
    
    sealed trait Cell
    case class TextCell(text: String) extends Cell
    case class NumericCell(value: BigDecimal) extends Cell
    // maybe later if needed:
    // case class FunctionCell(function: SomeExcelExpressionType) extends Cell
    
    type ExcelData = Map[(ColIndex, RowIndex), Cell]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

On the one hand, I read or hear that function calls are expensive and
So I have a hand-coded one-pager site with a very long length and dozens
I have a Coda slider on one webpage (hand-crafted, not using the plugin, but
Let's say I have a function that looks like this: public void saveBooking(/* some
I have a design that uses two outer columns, and within one of the
I have a function which is called explicitly by 4 other functions in my
Trying my hand with jQuery. I have this strange situation that i wish to
I have a JavaScript function that handles mouse button events. It must be able
To amortize the function call overhead I have changed my generator so that it
I have a function that accepts large std::vectors (passed by const & ) and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.