1 Feb 2011 3:17 AM #1
1 Feb 2011 11:54 PM #2
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.
3 Feb 2011 11:31 AM #3
3 Feb 2011 6:22 PM #4
Now about formulas you may need a formula parser check out this links
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
5 Feb 2011 7:20 AM #5
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:
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.
5 Feb 2011 7:42 AM #6
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 Feb 2011 5:36 AM #7
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 Feb 2011 9:25 AM #8
hi luke lukefowell89,
sure i can provide you some feedback.
first of all, you should really use a MultiCellSelectionModel like:
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
14 Feb 2011 9:29 AM #9
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
15 Feb 2011 2:21 AM #10
By j0452 in forum Ext 3.x: Help & DiscussionReplies: 11Last Post: 24 Sep 2010, 5:26 AM
By basementjack in forum Ext 3.x: Help & DiscussionReplies: 0Last Post: 19 Jul 2010, 7:35 PM
By boriscy in forum Ext 3.x: Help & DiscussionReplies: 0Last Post: 7 Sep 2009, 9:30 AM
By Supersuper in forum Ext 1.x: Help & DiscussionReplies: 0Last Post: 2 Aug 2007, 10:42 AM