473,406 Members | 2,293 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Conditional formatting of cell(s) in Excel object

1
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.ColorIndex 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;urn:schemas-microsoft-com:office:excel&quot;
xmlns=&quot;http://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:locked;}
.wc47388B2
{white-space:nowrap;
font-family:Arial;
mso-number-format:General;
font-size:auto;
font-weight:auto;
font-style:auto;
text-decoration:auto;
background:yellow;
mso-color-source:auto;
text-align:general;
vertical-align:bottom;
border-top:none;
border-left:none;
border-right:none;
border-bottom:none;
mso-protection:locked;}
--&gt;
&lt;/style&gt;
&lt;/head&gt;

&lt;body&gt;
&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
&lt;x:ExcelWorkbook&gt;
&lt;x:ExcelWorksheets&gt;
&lt;x:ExcelWorksheet&gt;
&lt;x:OWCVersion&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&gt;Microsoft Office Spreadsheet&lt;/x:Caption&gt;
&lt;/x:Label&gt;
&lt;x:Name&gt;Sheet1&lt;/x:Name&gt;
&lt;x:WorksheetOptions&gt;
&lt;x:Selected/&gt;
&lt;x:Height&gt;10583&lt;/x:Height&gt;
&lt;x:Width&gt;21167&lt;/x:Width&gt;
&lt;x:TopRowVisible&gt;0&lt;/x:TopRowVisible&gt;
&lt;x:LeftColumnVisible&gt;0&lt;/x:LeftColumnVisible&gt;
&lt;x:ProtectContents&gt;False&lt;/x:ProtectContents&gt;
&lt;x:DefaultRowHeight&gt;255&lt;/x:DefaultRowHeight&gt;
&lt;x:StandardWidth&gt;2340&lt;/x:StandardWidth&gt;
&lt;/x:WorksheetOptions&gt;
&lt;/x:ExcelWorksheet&gt;
&lt;/x:ExcelWorksheets&gt;
&lt;x:SpreadsheetAutoFit/&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="DisplayColHeaders" value="0">
<param name="DisplayGridlines" value="-1">
<param name="DisplayHorizontalScrollBar" value="-1">
<param name="DisplayRowHeaders" value="-1">
<param name="DisplayTitleBar" value="0">
<param name="DisplayToolbar" value="0">
<param name="DisplayVerticalScrollBar" value="-1">
<param name="EnableAutoCalculate" value="-1">
<param name="EnableEvents" value="-1">
<param name="MoveAfterReturn" value="0">
<param name="MoveAfterReturnDirection" value="0">
<param name="RightToLeft" value="0">
<param name="ViewableRange" value="A1">
</object>


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

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

Similar topics

163
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...
0
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...
0
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...
8
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...
18
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...
8
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...
0
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...
3
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...
10
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...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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,...
0
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...

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.