1. #1
    Sencha User lukefowell89's Avatar
    Join Date
    Nov 2010
    Location
    Dorset, UK
    Posts
    262
    Vote Rating
    1
    lukefowell89 is on a distinguished road

      0  

    Default Ext Simple Spreadsheet

    Ext Simple Spreadsheet


    n/a
    My Web Design, Development & Internet Marketing Blog: http://www.aztec-online.com
    Read My Review of the latest Ext JS Framework:Ext JS 4 Review

  2. #2
    Sencha User MartinL's Avatar
    Join Date
    Aug 2008
    Location
    Stuttgart, Germany
    Posts
    37
    Vote Rating
    0
    MartinL is on a distinguished road

      0  

    Default Great idea

    Great idea


    I wanted to do something similar... so I think its a great idea. Unfortunately I do not have so much time at the moment. I think it would also be great to open or import and export simple excel files.

    I wish you good luck for this project.

    regards,

    Martin

  3. #3

  4. #4
    Sencha Premium Member cmendez21's Avatar
    Join Date
    Jun 2007
    Location
    Mexico D.F.
    Posts
    478
    Vote Rating
    0
    cmendez21 is on a distinguished road

      0  

    Default


    Quote Originally Posted by lukefowell89 View Post
    I have updated the Simple Spreadsheet with some additional functionality: -

    • Borders/Outlines
    • Color Fill
    • Removing Cell Formatting
    • Draggable Cells
    • Show/Hide Grid
    • Row Resize

    You can check out a demo here

    I am looking to add formulas in next, but am looking for some advice on how I can intergrate Microsoft Excel style formulas using ExtJS. Any ideas or suggestions?
    HI luke, its a great work you have on the spreadsheet, KUDOS ..!

    Now about formulas you may need a formula parser check out this links

    http://www.codeproject.com/KB/script...ssioneval.aspx
    http://silentmatt.com/javascript-expression-evaluator/
    http://code.google.com/p/js-equation-parser/

    though they are quite good for calculating excel cells type you may need to make some changes that code n order to make it work as you want

    cheers
    E2CS: Extjs - Event calendar solution | XtPrinter
    Calendar Thread | XtPrinter Thread| Blog

  5. #5
    Ext JS Premium Member
    Join Date
    Sep 2008
    Location
    Raleigh, NC
    Posts
    145
    Vote Rating
    5
    qooleot is on a distinguished road

      0  

    Default


    Very cool so far! For formulas, it seems like there are two choices:

    1) Send data back to the server so its stored there in a mirrored spreadsheet. Use the openoffice API to do the calculations and send back the results. Another good choice might be spreadscript:

    http://www.greytrout.com/spreadscript.html

    This is a nice solution because it could apply more than just formulas - like integration with external data sources. With your spreadsheet being web-based, that might give it a killer purpose to be database-connected instead of just an simple excel clone. Anyways, you probably want to store the data so you'll have to send it over the wire at some point.

    2) Program a subset of formulas (like sum/avg/min/max/etc) with javascript.

  6. #6
    Sencha User
    Join Date
    Mar 2007
    Posts
    12
    Vote Rating
    0
    rtoepfer is on a distinguished road

      0  

    Default Other options

    Other options


    Possible to capture enter, shift-enter, tab, shift-tab, up, down, left, right keys to allow navigation? Also integration of drag-drop from Excel?

    I'm going to begin implementing above features for a current project.

  7. #7
    Ext JS Premium Member
    Join Date
    Sep 2008
    Location
    Raleigh, NC
    Posts
    145
    Vote Rating
    5
    qooleot is on a distinguished road

      0  

    Default


    Yes, doing formulas (especially the simpler ones) client-side is important even if you send to the server, because nobody would want to wait for an ajax response to say sum(A1:A5) when its such an easy calculation, so it seems like the right approach to start there.

    For some reason, I wasn't able to create a formula. I guess I'm doing something wrong with the syntax, or maybe I'm just assuming it would work like excel and something is off (as of course its still very new untested software so thats reasonable).

    Anyways, recursive formulas are a trick. If you haven't figured it out, I would suggest making a stack of the recursive calls (such as A1=sum(B1) and B1=sum(A1)) then going over it until you see the same cell used within the nested expression.

  8. #8
    Sencha User tobiu's Avatar
    Join Date
    May 2007
    Location
    Munich (Germany)
    Posts
    2,669
    Vote Rating
    110
    tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all

      0  

    Default


    hi luke lukefowell89,

    sure i can provide you some feedback.
    first of all, you should really use a MultiCellSelectionModel like:
    http://www.sencha.com/forum/showthre...SelectionModel

    With it, you can walk through the cells with the arrow-keys, select blocks of cells (like in your version), but also multiple blocks using CTRL.

    For the formulas you need to create listeners, e.g. at the cells.
    like if you use c3 = a1 + a2, each change of a1 or a2 need to change c3 as well. don't forget to remove listeners if you change / remove formulas.


    best regards and have fun with your project
    tobiu
    Best regards
    Tobias Uhlig
    __________

    S-CIRCLES Social Network Engine

  9. #9
    Sencha User tobiu's Avatar
    Join Date
    May 2007
    Location
    Munich (Germany)
    Posts
    2,669
    Vote Rating
    110
    tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all

      0  

    Default


    the listeners for formulas (if there are already implemented) don't work properly.

    if i enter a formula like =A1 + A2 it shows the right value.
    if i change A2 afterwards, it does not update.

    see my topic above for details.
    i still recommend the multiCellSelectionModel i linked to


    best regards
    tobiu
    Best regards
    Tobias Uhlig
    __________

    S-CIRCLES Social Network Engine

  10. #10
    Sencha User tobiu's Avatar
    Join Date
    May 2007
    Location
    Munich (Germany)
    Posts
    2,669
    Vote Rating
    110
    tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all

      0  
    Best regards
    Tobias Uhlig
    __________

    S-CIRCLES Social Network Engine

Similar Threads

  1. Spreadsheet-like data table
    By j0452 in forum Ext 3.x: Help & Discussion
    Replies: 11
    Last Post: 24 Sep 2010, 5:26 AM
  2. DataEntry aka Spreadsheet mode?
    By basementjack in forum Ext 3.x: Help & Discussion
    Replies: 0
    Last Post: 19 Jul 2010, 7:35 PM
  3. Spreadsheet like
    By boriscy in forum Ext 3.x: Help & Discussion
    Replies: 0
    Last Post: 7 Sep 2009, 9:30 AM
  4. can grid get data from xml Spreadsheet directly
    By Supersuper in forum Ext 1.x: Help & Discussion
    Replies: 0
    Last Post: 2 Aug 2007, 10:42 AM

Thread Participants: 17