So the data is sent in Excel format?
If Excel then you're looking at POI, JExcel, or one of the pay for license ones.
If not, then you'll have to say what the output is.
If this is just a data dump from the db, who cares what the users do with it?
You need to know what format this is supposed to be in before you can go anywhere with it...I assume that's in some requirements spec?
So when you say "spreadsheet" above in the OP, you meant you were having to write the spreadsheet code, and you weren't simply exporting the data as a spreadsheet...because that was far from clear from that post.
So, at the moment, you want to make your own cut down version of Excel?
Or is it simpler than that?
hello worldto look.
You may be able to use POI. I've not done this (I've only imported from and exported to excel files). There are methods for adding formulae to a cell, and then you can get the non-formula value from that Cell object.
I suspect you'd therefore have a POI Workbook with a Sheet sat behind your JTable. Anything the user enters into the front gets passed on to the Sheet, and any results are passed back to be displayed on the JTable.
How you wire these two things together is a task...I assume some form of table model, but it';s not something I've done and there are others here better at Swing than I am.
I have the feeling that this is all the wrong way around: excel is good at manipulation cells so leave that to excel and don't try to mimick it. Excel doesn't seem so good at other things so you should try to take care of that.
That would be my view, but it sounds like this is a project from their tutor...so anything goes.
Which does beg the question of whether this is actually what they want.
a hello world
Note that the Excel computable 'paradigm' (I like writing that word ;-) is quite a limited one and mainly targeted at the visualization of simple algebraic calculations. If the model of those cells comes from somewhere else (something that doesn't know about that paradigm (I did it again!) you are not forced to do your calculation in that paradigm (my nipples explode in delight!) either. Just the result of your calculations need to be exported to that bloody excel format; POI or jExcel are perfect for that. If I were you I'd stay as far away as possible from that excel paradigm (aaahhhh).
hello world work and is simple?
Ask your tutor what library it is they are expecting you to use, since they said that there was one available on the web.
we are supposed to find it, so i thought where better to ask than a java forum for some help....
The only thing I can think, if they mean for you to mimic Excel functions, is POI.
The thing is, I doubt there are many people who would bother to write their own spreadsheet software.
this link. (I googled for "Java spreadsheet").
Jos aka your friendly Google service