Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are there any open-source spreadsheet implementations in Smalltalk which are used for production level work? [closed]

If nothing exists matching this description, what's the closest I can get?

like image 791
blueberryfields Avatar asked Jan 12 '11 21:01

blueberryfields


3 Answers

Option 1) In Pharo 1.4 or 2.0

I have used SGrid (a.k.a GridMorph) to display hundreds of rows without major performance problems.

Install

Menu -> Tools -> Configuration Browser -> MorphicGrid (Install)

Example

| matrix grid rows cols |

rows := 2.
cols := 3.
matrix := Matrix rows: rows columns: cols.
1 to: rows do: [ : r |  
1 to: cols do: [ : c |
    matrix at: r at: c put: SmallInteger maxVal atRandom ] ].
grid := (GridMorph 
    from: matrix
    performing: {
        'Heading 1' -> #asNumber .
        'Heading 2' -> #asNumber .
        'Heading 3' -> #asNumber }) 
    title: 'GridMorph Example'.
grid openInWorld.

To interact with the grid (like bringing right button menu on any cell), you will have to fix issues related with the introduction of SmalltalkEditor class. The following code open a tabular picture viewer using the GridMorph and the flickr API (the flickr API usage is based on this cast):

| xmlStream xmlDoc photos |
xmlStream := 'http://api.flickr.com/services/feeds/photos_public.gne?id=14577317@N06&lang=en-us&format=rss_200' asUrl retrieveContents readStream.
xmlDoc := XMLDOMParser parseDocumentFrom: xmlStream.
photos := OrderedCollection new.
xmlDoc allElementsNamed: #item do: [ : item| | thumbUrl photoUrl |
    thumbUrl := ((item findElementNamed: #media:thumbnail) attributeAt: #url) asUrl.
    photoUrl := ((item findElementNamed: #media:content) attributeAt: #url) asUrl.
    photos add: (photoUrl -> (Form fromBinaryStream: thumbUrl retrieveContents readStream)) ].
((GridMorph
        from: photos
        performing: {'URL' -> [: assoc | assoc key asString ] . 'Picture' -> [: assoc | assoc value asMorph ]})
        title: 'Flickr GridMorph Example') openInWorld.

Option 2) In Pharo 1.4 or 2.0

There is a class MorphTreeMorph, which includes a comment with several example grids.

Example

SimpleGridExample new open
ClassListExample new openOn: Collection.

Option 3) In Squeak:

There is a project called Skeleton – easy simulation system which uses eToys and you can access its code from: http://source.squeak.org/etoysinbox.html

Installation

Installer squeak    
    project: 'etoysinbox';
    install: 'Skeleton'.

Example

SkSheet example "Move the red circle around"

I have not used it, but it seems to have basic formulas support.

like image 119
Hernán Avatar answered Oct 08 '22 16:10

Hernán


There is the start of one by Hans-Martin Mosner stored here...
http://smalltalkhub.com/#!/~StephaneDucasse/PetitsBazars/packages/Spreadsheet.
With this in Pharo you can do...

sheet := SpreadsheetGridMorph new openInWindow.
sheet cellStringAt: 1@1 put: '10'.
sheet cellStringAt: 1@2 put: '20'.
sheet cellStringAt: 1@3 put: '=A1+A2'.
sheet cellStringAt: 1@3. "-->30"
like image 26
Ben Coman Avatar answered Oct 08 '22 16:10

Ben Coman


I mostly prefer not to be restricted by rows and columns, and like the visibility of object browsers and inspectors.

I'm not sure what problem you try to solve here.

  • a smalltalk environment is a much more powerful modeling environment than a spreadsheet, and much easier to use for complex models. There you might want a rows-and-columns based viewer. Glamour provides solutions to easily build browsers. It is part of Moose.
  • spreadsheets are fine for prototyping small models, but have serious shortcomings in production environments: testability, multi-user support, performance.
  • in production environments much simpler grids are more often used.

A smalltalk environment should be learned while pair-programming a few hours with an expert. The way to use it is very different from using IDEs like Eclipse, Visual Studio, XCode or Delphi.

If you want to sift through a lot of data, and find the interesting objects, Moose offers a lot of help in visualizing your data. It is focused on software reengineering, but e.g. Mondrian is just as usable for financial data.

like image 31
Stephan Eggermont Avatar answered Oct 08 '22 18:10

Stephan Eggermont