The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

> HTML and Javascript
Amitesh
post Jun 9 2022, 12:23 AM
Post #1





Group: Members
Posts: 8
Joined: 8-June 22
Member No.: 28,380



I am working on a project to convert an excel file into a webpage. I have been able to design the page but now need to do some calculations (preferably automatic)

I have attached an html file with some codding i have done. I need the following calculations

- Calculate the sum of rows in the 2nd last column
- Calculate the sum on the bottom of all the columns
- In the last column i need a total from the sum multiplied by certain numbers as per mentioned in the tables below using high and low complexity

High Complexity:
Channel Existing New PLACEHOLDER ECCO Shell Expire Links Metadata PLACEHOLDER Images Modified More Than 6 Months Word Count More Than 2,000
Articles 180 240 15 10 2 10 0 30 60 60
Component Metadata 0 0 0 0 0 2 0 0 0 0
CAP/CAT/LE 75 75 15 10 2 10 0 30 60 60
DIR Component 45 45 15 2 2 2 0 30 45 45
Promotions 60 60 15 10 2 10 0 30 60 60
Alert/News 60 60 15 10 2 10 0 30 60 60
Update/News 60 60 15 10 2 10 0 30 60 60
ECCO Shell 15 15 15 10 2 10 0 30 15 15
Category Landing Page 180 240 15 10 2 10 0 30 60 60
Rewrite 240 240 15 10 2 10 0 30 60 60



Low Complexity:
Channel Existing New ECCO Shell Expire Links Metadata PLACEHOLDER Images Modified More Than 6 Months Word Count More Than 2,000
Articles 180 240 15 10 10 10 0 30 60 60
Component 45 45 15 10 10 2 0 30 60 60
CAP/CAT/LE 75 75 15 10 10 10 0 30 60 60
DIR Component 45 45 15 10 10 2 0 30 60 60
Promotions 60 60 15 10 10 10 0 30 60 60
Alert/News 60 60 15 10 10 10 0 30 60 60
Update/News 60 60 15 10 10 10 0 30 60 60
ECCO Shell 15 15 15 10 10 10 0 30 60 60
Category Landing Page 180 240 15 10 10 10 0 30 60 60
Rewrite 240 240 15 10 10 10 0 30 60 60


Attached File(s)
Attached File  Tables.html ( 10.95k ) Number of downloads: 587
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
 
Reply to this topicStart new topic
Replies
Amitesh
post Jun 17 2022, 10:31 AM
Post #2





Group: Members
Posts: 8
Joined: 8-June 22
Member No.: 28,380



Is it possible to convert these tables into hidden tables and then use them for multiplication?

High Complexity:
Channel Existing New PLACEHOLDER ECCO Shell Expire Links Metadata PLACEHOLDER Images Modified More Than 6 Months Word Count More Than 2,000
Articles 180 240 15 10 2 10 0 30 60 60
Component Metadata 0 0 0 0 0 2 0 0 0 0
CAP/CAT/LE 75 75 15 10 2 10 0 30 60 60
DIR Component 45 45 15 2 2 2 0 30 45 45
Promotions 60 60 15 10 2 10 0 30 60 60
Alert/News 60 60 15 10 2 10 0 30 60 60
Update/News 60 60 15 10 2 10 0 30 60 60
ECCO Shell 15 15 15 10 2 10 0 30 15 15
Category Landing Page 180 240 15 10 2 10 0 30 60 60
Rewrite 240 240 15 10 2 10 0 30 60 60



Low Complexity:
Channel Existing New ECCO Shell Expire Links Metadata PLACEHOLDER Images Modified More Than 6 Months Word Count More Than 2,000
Articles 180 240 15 10 10 10 0 30 60 60
Component 45 45 15 10 10 2 0 30 60 60
CAP/CAT/LE 75 75 15 10 10 10 0 30 60 60
DIR Component 45 45 15 10 10 2 0 30 60 60
Promotions 60 60 15 10 10 10 0 30 60 60
Alert/News 60 60 15 10 10 10 0 30 60 60
Update/News 60 60 15 10 10 10 0 30 60 60
ECCO Shell 15 15 15 10 10 10 0 30 60 60
Category Landing Page 180 240 15 10 10 10 0 30 60 60
Rewrite 240 240 15 10 10 10 0 30 60 60
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Jun 17 2022, 02:11 PM
Post #3


.
********

Group: WDG Moderators
Posts: 9,661
Joined: 10-August 06
Member No.: 7



QUOTE(Amitesh @ Jun 17 2022, 05:31 PM) *

Is it possible to convert these tables into hidden tables and then use them for multiplication?

Maybe you could hide them with CSS, but that sounds like an unnecessary complication. Where does the table cell data come from in the first place --from Excel files? In that case maybe you could convert those Excel files into some more practical format for multiplication, such as javascript variables, or an array.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Amitesh
post Jun 17 2022, 11:19 PM
Post #4





Group: Members
Posts: 8
Joined: 8-June 22
Member No.: 28,380



QUOTE(Christian J @ Jun 17 2022, 02:11 PM) *

QUOTE(Amitesh @ Jun 17 2022, 05:31 PM) *

Is it possible to convert these tables into hidden tables and then use them for multiplication?

Maybe you could hide them with CSS, but that sounds like an unnecessary complication. Where does the table cell data come from in the first place --from Excel files? In that case maybe you could convert those Excel files into some more practical format for multiplication, such as javascript variables, or an array.


Yes these are from excel. I am trying to convert an excel file into html. Therefore all this work.

I am fine by converting these tables into javascript variables.

If i can use these variables for multiplication with the total amount of the rows my work will be complete.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Jun 18 2022, 04:15 PM
Post #5


.
********

Group: WDG Moderators
Posts: 9,661
Joined: 10-August 06
Member No.: 7



QUOTE(Amitesh @ Jun 18 2022, 06:19 AM) *

Yes these are from excel. I am trying to convert an excel file into html. Therefore all this work.

I don't understand what functionality you want the HTML page to have. For example, should the user be able to change text field values from the web browser, and the HTML will recalculate the output? In that case you would need a visible table with INPUT fields. Or is it something else you have in mind?

User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Amitesh
post Jun 21 2022, 10:38 AM
Post #6





Group: Members
Posts: 8
Joined: 8-June 22
Member No.: 28,380



QUOTE(Christian J @ Jun 18 2022, 04:15 PM) *

QUOTE(Amitesh @ Jun 18 2022, 06:19 AM) *

Yes these are from excel. I am trying to convert an excel file into html. Therefore all this work.

I don't understand what functionality you want the HTML page to have. For example, should the user be able to change text field values from the web browser, and the HTML will recalculate the output? In that case you would need a visible table with INPUT fields. Or is it something else you have in mind?


Hi Christian,

So what i need is as follows:
1) Sum all the rows. (done as per your javascript codes)
2) Sum all the columns. (done as per your javascript codes)
3) As per the column selected multiply the sum with a set number as per the table and display in the last column.
Eg: If you have added a number in Row Articles and column New as 2 and the complexity is Low then the last column should calculate the total as 2 X 240 = 480
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Posts in this topic


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 27th April 2024 - 04:58 AM