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

时光毁灭记忆、已成空白 提交于 2019-12-21 05:31:27

问题


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


回答1:


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.




回答2:


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"



回答3:


It appears the answer to this question is "no".




回答4:


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.



来源:https://stackoverflow.com/questions/4674116/are-there-any-open-source-spreadsheet-implementations-in-smalltalk-which-are-use

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!