HTML table for XLS (cell used for formula)

I am making an HTML table and I want it to be converted to an XLS file

I use this table for example

<table> <tr> <td>AUD</td> <td>200.00</td> </tr> <tr> <td>AUD</td> <td>200.00</td> </tr> <tr> <td>AUD</td> <td>200.00</td> </tr> <tr> <td>EUR</td> <td>300.00</td> </tr> <tr> <td>AUD</td> <td>200.00</td> </tr> <tr> <td>AUD</td> <td>200.00</td> </tr> <tr> <td>AUD</td> <td>200.00</td> </tr> <tr> <td>AUD</td> <td>**=SUM(A2:A10);**</td> </tr> </table> 

Is there a way to create a cell with =SUM(A2:A10); as a formula, not ordinary plain text?

+4
source share
2 answers

When importing html to excel, it is important to know that there are many special excel attributes that you can use to get excel to work pretty much as you expected for almost any business requirement.

You will need extended namespaces:

 <html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40"> </html> 

And then you can create a formula in a table cell:

 <td x:num x:fmla="=SUM(A2,A10)">0</td> 

You can read a lot more about how to properly implement these features in this article: http://www.c-sharpcorner.com/UploadFile/kaushikborah28/79Nick08302007171404PM/79Nick.aspx

+8
source

This works for me:

replace

 <tr> <td>AUD</td><td>**=SUM(A2:A10);**</td> </tr> 

with

 <tr> <td>AUD</td><td>=SUM(A2:A10)</td> </tr> 
0
source

All Articles