Important alert: (current site time 7/15/2013 1:41:47 PM EDT)
 

winzip icon

JavaScript Spreadsheet Program (UPDATED)

Email
Submitted on: 3/5/2008 2:55:10 PM
By: Rde 
Level: Intermediate
User Rating: By 2 Users
Compatibility: JavaScript
Views: 17174
author picture
 
     This single web page uses a cookies module and a search and replace module to produce a fully functional Spreadsheet Program. It features associative arrays to store the data, smart field updating, formulas (including ranges. UPDATED: ranges now include all simple operators - not just addition), a help popup window, and saving state between uses using cookies. The code is well commented. Complete with js modules with accompanying header files. The 26k zip includes an additional cookie script example by Travis Simon.
 
Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!
'**************************************
' for :JavaScript Spreadsheet Program(UPDATED)
'**************************************
This spreadsheet started life as a demo script from the following book:
Teach yourself JavaScript in a week
by Arman Danesh
sams.net publishing
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come out every day, so no prevention program can catch 100% of them. For your own safety, please:
  1. Re-scan downloaded files using your personal virus checker before using it.
  2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this code, you agree to the following terms...   
  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.


Other 14 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Intermediate category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments
5/2/2004 1:55:19 PMCoolMints

This is a very good example of the enormous possibilities of Javascript. Brilliant work.
(If this comment was disrespectful, please report it.)

 
5/3/2004 12:43:08 AMRde

Thanks for the comments and votes CoolMints, much appreciated. Happy coding, Rd.
(If this comment was disrespectful, please report it.)

 
5/3/2004 12:46:05 AMRde

BTW, I claimed all code was mine - not so. Woops. Although I have improved on the cookie functions they were written by Bill Dortch, hIdaho Design.
(If this comment was disrespectful, please report it.)

 
5/15/2004 4:37:44 AMMohd Rizuan

Rde your need to improve your code.
I think your code in 3-4 star.
But because your idea is great i think it can be 5 star.
I will make some research for your code later because right now i make my generator A Dizzy Generator.
(If this comment was disrespectful, please report it.)

 
5/16/2004 8:25:32 AMRde

No problemo Mohd. Any suggestions for improvement will be greatly appreciated. But for now happy generating :)

Rd.
(If this comment was disrespectful, please report it.)

 
6/2/2004 9:20:10 AMCoolMints

Congratulations Rde!
(If this comment was disrespectful, please report it.)

 
6/14/2004 12:16:49 AMRde

Thanks CoolMints :)
(If this comment was disrespectful, please report it.)

 
2/2/2009 7:33:46 AMRde


I found a bug in the spreadsheet (after all this time)!

In the doRanges function at the bottom (line 1113):

rangeExp2 += ' + ' + letters.charAt(counter) + firstNum + ';'

should be:

rangeExp2 += ' ' + op + ' ' + letters.charAt(counter) + firstNum + ';'

Ranges were originally addition only and when I updated them to include all operators (+-*/%') I missed a required change in the validation/conversion process.

The user can now specify the operator within the range but if omitted it will default to addition - it was working correctly if the range ran down a column but was set to addition only if the range ran across a row.

(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.