Results 1 to 9 of 9
  1. #1
    New Lounger
    Join Date
    Nov 2003
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    keeping conditional formats in html (Windows xp home ed.)

    I have made a spreadsheet with conditional formatting where cells fill red if a number less than 7.35 is entered and blue if a number greater than 7.45 is entered. The colors are important because they match the pH acid/base colors. The problem encountered is only present when I save or publish to html and check the interactive box so that data can be entered into the sheet from the web. None of the fill colors are present.
    Excel says that some formatting may be lost when publishing that way. Is there any work-around or something else that would work?
    Thank you for your help.
    I can attach the sheet if requested.

  2. #2
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: keeping conditional formats in html (Windows xp home ed.)

    I don't work with excel in HTML so I do not know all the limitations. If it cannot do cond formatting you have 2 options:

    before you save the file as html, you must convert the cond formatting to explicit formatting:
    Chip Pearson has some code to get the conditional formatting color. you could loop thru getting it and changing it. This will be set now when you are in HTML as the color and will not be live (as cond formatting is)

    If you can write code in HTML, you could crete your own cond formatting scheme. When the pH changed, you could set the color correctly as you go. This is also possible to do in excel if you have more than 4 formats (3 conditions), but it is much slower than excel's routines

    Steve

  3. #3
    New Lounger
    Join Date
    Nov 2003
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: keeping conditional formats in html (Windows xp home ed.)

    Hi Steve,
    I am not a coder at all, but I am going to investigate the code you directed me to. Sincere thanks for helping me have some idea of where to start on this. <img src=/S/brickwall.gif border=0 alt=brickwall width=25 height=15>
    --Atticus

  4. #4
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: keeping conditional formats in html (Windows xp home ed.)

    If you need help with the coding, post back with any specific questions.

    Steve

  5. #5
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Weert, Limburg, Netherlands
    Posts
    4,812
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: keeping conditional formats in html (Windows xp home ed.)

    You could try whether this custom number format carries over:

    <!t>[red]<!/t><!t>[<=7.35]<!/t>,<!t>[blue]<!/t><!t>[>7.45]<!/t>
    Jan Karel Pieterse
    Microsoft Excel MVP, WMVP
    www.jkp-ads.com
    Professional Office Developers Association

  6. #6
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: keeping conditional formats in html (Windows xp home ed.)

    This will only change the text color. I believe the poster wanted the interior color changed, which (I do not think) is possible via a custom format.

    Steve

  7. #7
    Platinum Lounger
    Join Date
    Nov 2001
    Location
    Vienna, Wien, Austria
    Posts
    5,009
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: keeping conditional formats in html (Windows x

    In principle, Excel's Microsoft Script Editor - available in Excel 2000 and above - should be able to accomplish something using an HTML style. While I know enough HTML to see how this could work, I have really worked with MSE enough to give any firm ideas. I do realise that your "killer ap" is Excel 97. Perhaps other Loungers may have some input on this.
    Gre

  8. #8
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Weert, Limburg, Netherlands
    Posts
    4,812
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: keeping conditional formats in html (Windows xp home ed.)

    I know, I just wanted to offer an alternative. Forgot to mention it was only the text colour.
    Jan Karel Pieterse
    Microsoft Excel MVP, WMVP
    www.jkp-ads.com
    Professional Office Developers Association

  9. #9
    Platinum Lounger
    Join Date
    Nov 2001
    Location
    Vienna, Wien, Austria
    Posts
    5,009
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: keeping conditional formats in html (Windows x

    Looking at this a bit further, it seems that some JavaScript could be written into the Excel file using Microsoft Script Editor. Searches on this, however, have produced very little.
    Gre

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •