Live data from Hacker News

JavaScript grid editor: I want to be Excel. Updated

roberto.open-lab.com

1–8 of 8 posts

Re: JavaScript grid editor: I want to be Excel. Updated

#2
Formulas aside, you can roll your own Excel clone fairly easily. Have a normal HTML table, capture the cell clicks. On a click, replace the cell's HTML with that of a text box containing the same text. Capture tab, shift-tab and enter keypresses and you're nearly there.

Re: JavaScript grid editor: I want to be Excel. Updated

#5

Formulas aside, you can roll your own Excel clone fairly easily. Have a normal HTML table, capture the cell clicks. On a click, replace the cell's HTML with that of a text box containing the same text. Capture tab, shift-tab and enter keypresses and you're nearly there.

you can roll your own Excel clone fairly easily

Well, it would need to be able to add rows/columns and delete them. Copy/pastability would help, too. A necessary pre-requisite for that is going to be the ability to select entire columns at a time -- that's going to have to be custom-done because your browser isn't that smart. Let's see, an undo wouldn't hurt. Oh, and the escape out of editing mode. And resizing when you overflow a single cell. Speaking of which, drag and drop resizing on arbitrary rows/columns.

There's probably a few requirements I'm missing, but no problem, I can whip up a Stack Overflow clone in like a weekend and solicit suggestions on what one or two trivial details I still need to implement to duplicate the thousands of man years in Excel.

Re: JavaScript grid editor: I want to be Excel. Updated

#6
post #5

Formulas aside, you can roll your own Excel clone fairly easily. Have a normal HTML table, capture the cell clicks. On a click, replace the cell's HTML with that of a text box containing the same text. Capture tab, shift-tab and enter keypresses and you're nearly there.

you can roll your own Excel clone fairly easily Well, it would need to be able to add rows/columns and delete them. Copy/pastability would help, too. A necessary pre-requisite for that is going to be the ability to select entire columns at a time -- that's going to have to be custom-done because your browser isn't that smart. Let's see, an undo wouldn't hurt. Oh, and the escape out of editing mode. And resizing when…

This comment made me smile.

Re: JavaScript grid editor: I want to be Excel. Updated

#7
post #5

Formulas aside, you can roll your own Excel clone fairly easily. Have a normal HTML table, capture the cell clicks. On a click, replace the cell's HTML with that of a text box containing the same text. Capture tab, shift-tab and enter keypresses and you're nearly there.

you can roll your own Excel clone fairly easily Well, it would need to be able to add rows/columns and delete them. Copy/pastability would help, too. A necessary pre-requisite for that is going to be the ability to select entire columns at a time -- that's going to have to be custom-done because your browser isn't that smart. Let's see, an undo wouldn't hurt. Oh, and the escape out of editing mode. And resizing when…

I'm not sure whether it wasn't obvious enough, or you're being a tad disingenuous. I was talking about a very simple implementation, which has worked for me on a number of occasions.

Incidentally, if you weren't just nitpicking and really do rely on copy/paste between Excel and a web-based spreadsheet you need to be careful. JavaScript only has access to the plain-text clipboard from Excel. This is just the stuff you can see. If anything has been truncated for display purposes in Excel, it'll be missing from the copy buffer.

Re: JavaScript grid editor: I want to be Excel. Updated

#8
post #5

Earlier quoted context omitted.

you can roll your own Excel clone fairly easily Well, it would need to be able to add rows/columns and delete them. Copy/pastability would help, too. A necessary pre-requisite for that is going to be the ability to select entire columns at a time -- that's going to have to be custom-done because your browser isn't that smart. Let's see, an undo wouldn't hurt. Oh, and the escape out of editing mode. And resizing when…

I'm not sure whether it wasn't obvious enough, or you're being a tad disingenuous. I was talking about a very simple implementation, which has worked for me on a number of occasions. Incidentally, if you weren't just nitpicking and really do rely on copy/paste between Excel and a web-based spreadsheet you need to be careful. JavaScript only has access to the plain-text clipboard from Excel. This is just the stuff you…

I think he meant copy and paste as in multiple cells in your sheet being copy/pastable.