Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6549097
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T12:03:03+00:00 2026-05-25T12:03:03+00:00

I am trying to convert html to excel without using any library. I just

  • 0

I am trying to convert html to excel without using any library.

I just encountered one problem…. I have the classes ready etc etc (basically I exported an excel to html) and is now doing it vice versa [just changing the content].

I am formatting my currency/totals as numbers with 2 decimals. (when you right click them it says so at least) but in the excel it still shows as a Text and in order to work with them it requires me to press Convert to Number

At the moment I have this in my loop. Do you think its enough ?

<td class=xl112 align=right style='border-top:none;border-left:none'>2,033.00
</td>

and in the css I have

.xl112
    {mso-style-parent:style0;
    mso-number-format:"\#\,\#\#0\.00_ \;\[Red\]\\-\#\,\#\#0\.00\\ ";
    vertical-align:middle;
    border-top:.5pt solid windowtext;
    border-right:1.0pt solid windowtext;
    border-bottom:.5pt solid windowtext;
    border-left:1.0pt solid windowtext;
    background:#FFFF99;
    mso-pattern:auto none;}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T12:03:04+00:00Added an answer on May 25, 2026 at 12:03 pm

    This worked for me. Not sure why you have those backslashes in your number format style?

    See here: http://codesnipers.com/?q=excel-compatible-html

    Full reference: http://msdn.microsoft.com/en-us/library/Aa155477(office.10).aspx

    <html xmlns:o="urn:schemas-microsoft-com:office:office" 
          xmlns:x="urn:schemas-microsoft-com:office:excel" 
          xmlns="http://www.w3.org/TR/REC-html40">
    
    <head>
        <style>
            .s1 {mso-number-format:"#,##0.00_ ;[Red]-#,##0.00";}
        </style>
    </head>
    
    
    
     <body>
      <table>
          <tr>
            <td class="s1" x:num="2033">2033</td>
          </tr>
      </table>
     </body>
    </html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to convert some Xaml to HTML using the .NET XslCompiledTransform and am
I am trying to convert an HTML file into XML file using XSLT (Using
I'm trying to convert programatically PDF to HTML. So far I've been using pdftohtml
I have been trying to convert sdot like this html_entity_decode(&sdot;); Any tips?
I'm trying to convert from excel spreadsheet (.xls) to html via MS Excel 2010,
I have an XML file and I'm trying convert it into a (table( HTML
I have this psd and trying to convert it to html css. But only
I have been trying to convert doc/docx files to html, the best bet I
I'm having a problem with jquery trim function. I'm trying to convert an html
I have this HTML and i am trying to convert the href from photo.php

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.