473,651 Members | 2,566 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Conditional formatting of cell(s) in Excel object

1 New Member
Ok so I have an html page with an embedded excel object. I load some information into the object from a spreadsheet. (works perfectly) I would like to be able to change the background of a few cells in the object based on there new values. How do I do this? I've done this before with VBA scripts in excel using the cell.Interior.C olorIndex property, but it definitely doesn't work with this object.

Any help would be much appreciated. I've included the object code because I think that's the only thing that is necessary.

Thanks!


[HTML]

<object
width = 800
height = 400
id = 'excel'
classid = 'CLSID:0002E510-0000-0000-C000-000000000046' border="2">

<param name="HTMLURL" value>
<param name="HTMLData" value="&lt;html xmlns:x=&quot;u rn:schemas-microsoft-com:office:exce l&quot;
xmlns=&quot;htt p://www.w3.org/TR/REC-html40&quot;&gt ;

&lt;head&gt;
&lt;style type=&quot;text/css&quot;&gt;
&lt;!--tr
{mso-height-source:auto;}
td
{white-space:nowrap;}
.wc0A288B2
{white-space:nowrap;
font-family:Arial;
mso-number-format:General;
font-size:auto;
font-weight:auto;
font-style:auto;
text-decoration:auto ;
mso-background-source:auto;
mso-pattern:auto;
mso-color-source:auto;
text-align:general;
vertical-align:bottom;
border-top:none;
border-left:none;
border-right:none;
border-bottom:none;
mso-protection:lock ed;}
.wc47388B2
{white-space:nowrap;
font-family:Arial;
mso-number-format:General;
font-size:auto;
font-weight:auto;
font-style:auto;
text-decoration:auto ;
background:yell ow;
mso-color-source:auto;
text-align:general;
vertical-align:bottom;
border-top:none;
border-left:none;
border-right:none;
border-bottom:none;
mso-protection:lock ed;}
--&gt;
&lt;/style&gt;
&lt;/head&gt;

&lt;body&gt;
&lt;!--[if gte mso 9]&gt;&lt;xml& gt;
&lt;x:ExcelWork book&gt;
&lt;x:ExcelWork sheets&gt;
&lt;x:ExcelWork sheet&gt;
&lt;x:OWCVersio n&gt;9.0.0.4309 &lt;/x:OWCVersion&gt ;
&lt;x:Label Style='border-top:solid .5pt silver;border-left:solid .5pt silver;
border-right:solid .5pt silver;border-bottom:solid .5pt silver'&gt;
&lt;x:Caption&g t;Microsoft Office Spreadsheet&lt;/x:Caption&gt;
&lt;/x:Label&gt;
&lt;x:Name&gt;S heet1&lt;/x:Name&gt;
&lt;x:Worksheet Options&gt;
&lt;x:Select ed/&gt;
&lt;x:Height&gt ;10583&lt;/x:Height&gt;
&lt;x:Width&gt; 21167&lt;/x:Width&gt;
&lt;x:TopRowVis ible&gt;0&lt;/x:TopRowVisible &gt;
&lt;x:LeftColum nVisible&gt;0&l t;/x:LeftColumnVis ible&gt;
&lt;x:ProtectCo ntents&gt;False &lt;/x:ProtectConten ts&gt;
&lt;x:DefaultRo wHeight&gt;255& lt;/x:DefaultRowHei ght&gt;
&lt;x:StandardW idth&gt;2340&lt ;/x:StandardWidth &gt;
&lt;/x:WorksheetOpti ons&gt;
&lt;/x:ExcelWorkshee t&gt;
&lt;/x:ExcelWorkshee ts&gt;
&lt;x:Spreadshe etAutoFit/&gt;
&lt;x:MaxHeight &gt;80%&lt;/x:MaxHeight&gt;
&lt;x:MaxWidth& gt;80%&lt;/x:MaxWidth&gt;
&lt;/x:ExcelWorkbook &gt;
&lt;/xml&gt;&lt;![endif]--&gt;

&lt;table class=wc0A288B2 x:str&gt;
&lt;col class=wc47388B2 width=&quot;64& quot;&gt;
&lt;tr height=&quot;17 &quot;&gt;
&lt;td class=wc47388B2 &gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;

&lt;/body&gt;

&lt;/html&gt;
">
<param name="DataType" value="HTMLDATA ">
<param name="AutoFit" value="-1">
<param name="DisplayCo lHeaders" value="0">
<param name="DisplayGr idlines" value="-1">
<param name="DisplayHo rizontalScrollB ar" value="-1">
<param name="DisplayRo wHeaders" value="-1">
<param name="DisplayTi tleBar" value="0">
<param name="DisplayTo olbar" value="0">
<param name="DisplayVe rticalScrollBar " value="-1">
<param name="EnableAut oCalculate" value="-1">
<param name="EnableEve nts" value="-1">
<param name="MoveAfter Return" value="0">
<param name="MoveAfter ReturnDirection " value="0">
<param name="RightToLe ft" value="0">
<param name="ViewableR ange" value="A1">
</object>


[/HTML]
Dec 12 '06 #1
0 3034

Sign in to post your reply or Sign up for a free account.

Similar topics

163
14604
by: Shiperton Henethe | last post by:
Hi Know any good utilities to help me strip out the tags that Microsoft Excel 2002 leaved behind when you try and export an HTML format file? This is driving me NUTS. And really makes me hate microsoft with a passion. I literally just want "compact HTML" - ie just the data,
0
1138
by: VictorReinhart | last post by:
Hi, Access 2000, Conditional Formatting. I want to change the background color of a cell if its value differs from the same cell in the prior row (a "control break"). What can I do? Thank you Victor Reinhart
0
3095
by: ImraneA | last post by:
Hi there Many thanks to those people who contributed to this group, helped me greatly. Enclose, my code, hope it helps others :- Public Function Export_Excel_9(tbx1 As Variant, tbx2 As Variant, tbx3 As Variant, tbx4 As Variant, tbx5 As Variant, tbx6 As Variant, tbx7 As
8
12040
by: Dimitri Furman | last post by:
Given: Access 2002/2003 A subform in datasheet or continuous view, placed on a tab page (this last may or may not matter) Conditional formatting applied to some controls on the subform - format expressions are the same for all controls Under some undetermined circumstances, when such subform is displayed, the controls on the subform start to visibly flicker, the cursor in the subform stops blinking, and CPU utilization goes to 100%....
18
8278
by: Frank M. Walter | last post by:
Hello, I have made an small AddIn with udf for excel 2003. I use vs2003. The point of view is the function __T() I call it in excel sheet writing =__T() I am not able to set a value to a given cell. region.Value2="qwe"; //bumm! A exception will be trown. On all PCs with excel. HRESULT 0x800A03EC
8
8482
by: Typehigh | last post by:
I have many text fields with conditional formatting applied, specifically when the condition is "Field Has Focus". Without any events associated with the fields the conditional formatting works perfectly. However, I have code that runs under the ON CLICK event. The code changes the focus to other controls, which means the conditional formatting is no longer displayed. This part makes sense to me. Here's what doesn't make sense. The last...
0
2523
by: urbancowboy | last post by:
Hi, I'm a complete noob to XSLT. My goal is to apply conditional formatting to the table-cell only so when the date = today, the entire table-cell background will highlight green (#00FF00) and not just the font itself. So far, I can only get the Font to change color/become highlighted. Any help please? --------------------------------- <td><span> <xsl:attribute name="style"> <xsl:if...
3
3327
by: WU10 | last post by:
I have built a simple database to track the mechanical condition of offshore equipment. We established a system of ranking for issues that arise and used conditional formatting of the cell's background to make these issues visible. White cell (default) indicates "No Issue", Green "Low", Yellow "Medium" and Red "High". This is currently woking fine. Recently our corporate gurus have now come up with a 4th color, Amber "Significant"...
10
9668
by: afromanam | last post by:
Regards, Please help What I'm trying to do is this: (and I can't use reports since I must export to Excel) I export some queries to different tabs in an excel workbook I then loop through each tab and apply autowidth to columns and apply autofilter to the first row of every tab in the workbook. I've this down
0
8352
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8275
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8579
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7297
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6158
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5612
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4144
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
1909
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1587
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.