I'm facing an issue while trying to apply currency formatting to an HTML table in order to have it display correctly when opened in Excel. Initially, I tried doing this inline and it worked fine, like so:
<td style="mso-number-format:$\##\,\##\##0\.00">=(sum(n4:n50))</td>
However, since I need to apply this formatting to multiple fields, I wanted to create a reusable class for it.
<style>
.cf{
mso-number-format:$\##\,\##\##0\.00;
}
</style>
I then attempted to use the class like so:
<td class="cf">=(sum(n4:n50))</td>
Unfortunately, this method didn't work and I am unsure why. Can anyone provide assistance to this CSS beginner?
Thank you