Click to See Complete Forum and Search --> : Javascript spreadsheet
maxwell
03-24-2004, 11:42 AM
I would like to add spreadsheet functionality to my tables. The number of columns is fixed. I can add up all the items in a table row. However the number of rows is dependent on each employee in my employee table and therefore not fixed. Could someone provide code to add up a column of data without knowing how many rows will be in the table? For example employee A, on colum heading Monday works in X departments. Any help is much appreciated. Thanks.
HFS
Khalid Ali
03-24-2004, 02:16 PM
I think you may want to elaborate a bit more....
maxwell
04-19-2004, 02:19 PM
Hello Khalid,
For the company I am working for we have employees that work in multiple departments. I have a table setup in an Access Database that keeps track of which department each employee belongs to. For some it could be 5 depts for others any number between 1 & 8.
The form form that it being filled out in DeptTime.asp is a dynamically cretaed table with rows ranging from 1-8.
This is a sample of what the output would look like:
JobType Sun Mon Tue Wed Thur Frid Sat Subtotal
Dept1 0 3 3 3 3 3 0 15
Dept2 0 3 3 3 3 3 0 15
Dept3 0 2 2 2 2 2 0 10
Subtotals 0 8 8 8 8 8 0 40
So when I change the qty in the sunday column for dept1 the subtotal for the row gets updated and the subtotal for the Sunday column gets updated as does the final total number of hours.
I hope this makes sense.
Thanks,
Maxwell