dovrei colorare 7 colori per 49 numeri
cioè
1-8-15-22-29-36-43 colore Verde
2-9-16-23-30-37-44 colore rosso
3-10-17-24-31-38-45 colore arancio
4-11-18-25-32-39-46 colore giallo
5-12-19-26-33-40-47 colore marrone
6-13-20-27-34-41-48 colore viola
7-14-21-28-35-42-49 colore blu
come posso colorare in formato html
la sorgente è stata creata con Font page 2000
http://www.grillizan.info/lotto_uk49s.htm
--------------------------------------------------------------------------------------------------------------
in VBA di excel
Sub copia()
'
' copia Macro
' Macro registrata il 13/08/2009 da Domenico
'
'
Dim N, M, num, colore, reso
ActiveSheet.Unprotect
Range("E3:K204").Select
Selection.Interior.Color = xlNone
For N = 3 To 104
For M = 1 To 6
num = Cells(N, M + 13).Value
If num = 0 Then
reso = Cells(N, M + 4).Value
colore = reso Mod 7 '----------------> qui il comando dei 7 colori
in num 0 to 6 trasformato in select case
Select Case colore
Case 0
Cells(N, M + 4).Select
Selection.Interior.ColorIndex = 33
Case 1
Cells(N, M + 4).Select
Selection.Interior.ColorIndex = 4
Case 2
Cells(N, M + 4).Select
Selection.Interior.ColorIndex = 3
Case 3
Cells(N, M + 4).Select
Selection.Interior.ColorIndex = 46
Case 4
Cells(N, M + 4).Select
Selection.Interior.ColorIndex = 6
Case 5
Cells(N, M + 4).Select
Selection.Interior.ColorIndex = 40
Case 6
Cells(N, M + 4).Select
Selection.Interior.ColorIndex = 39
End Select
End If
Next M
Next N
ActiveSheet.Protect
Range("A1:K104").Select
Selection.Copy
End Sub
il codice html
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Lotto UK49s</title>
<meta name="Microsoft Theme" content="copia-di-industriale 011,
default">
<meta name="Microsoft Border" content="tl, default">
</head>
<body>
<h1>Lotto Uk 49's<br>
<img border="0" src="49sLogo.jpg"></h1>
<p>Visite Avvenute: <!--webbot bot="HitCounter" u-custom
i-digits="6" i-image="4"
PREVIEW="<strong>[contatore visite]</strong>" i-
resetvalue="0" startspan --><img src="_vti_bin/fpcount.exe/C:/Documents
%20and%20Settings/Domenico/Documenti/Web/grillizan.info/?
Page=Uk49s.asp|Image=4|Digits=6" alt="Contatore visite"><!--webbot
bot="HitCounter" endspan -->
</p>
<table border="1">
<thead>
<tr>
<td><b>Estr</b></td>
<td><b>Data</b></td>
<td align="center"><b>E1</b></td>
<td align="center"><b>E2</b></td>
<td align="center"><b>E3</b></td>
<td align="center"><b>E4</b></td>
<td align="center"><b>E5</b></td>
<td align="center"><b>E6</b></td>
<td><b>Jolly</b></td>
</tr>
</thead>
<tbody>
<!--webbot bot="DatabaseRegionStart" startspan
s-columnnames="Estr,Data,E1,E2,E3,E4,E5,E6,Jolly"
s-columntypes="5,135,5,5,5,5,5,5,5" s-dataconnection="Database5"
b-tableformat="TRUE" b-menuformat="FALSE" s-menuchoice="Estr" s-
menuvalue="Estr"
b-tableborder="TRUE" b-tableexpand="FALSE" b-tableheader="TRUE"
b-listlabels="TRUE" b-listseparator="TRUE" i-ListFormat="0"
b-makeform="TRUE" s-recordsource="ArchivioUk49s"
s-displaycolumns="Estr,Data,E1,E2,E3,E4,E5,E6,Jolly" s-criteria
s-order="[Estr] -" s-sql="SELECT * FROM ArchivioUk49s ORDER BY
Estr DESC"
b-procedure="FALSE" clientside SuggestedExt="asp" s-DefaultFields
s-NoRecordsFound="Nessun record restituito." i-MaxRecords="0"
i-GroupSize="25" BOTID="0" u-dblib="_fpclass/fpdblib.inc"
u-dbrgn1="_fpclass/fpdbrgn1.inc" u-dbrgn2="_fpclass/fpdbrgn2.inc"
tag="TBODY"
local_preview="<tr><td colspan=64
bgcolor="#FFFF00" align="left" width="
100%"><font color="#000000">Per visualizzare
l'anteprima di un'area risultati database è necessario accedere alla
pagina connettendosi al server Web tramite browser. La riga seguente
verrà ripetuta per ciascun record restituito dalla query.</
font></td></tr>"
preview="<tr><td colspan=64 bgcolor="#FFFF00"
align="left" width="100%"><font
color="#000000">Inizio dell'area risultati database. Per
visualizzare correttamente l'area risultati database è necessario
accedere alla pagina connettendosi al server Web tramite browser. Il
Web corrente è memorizzato nella rete o in un disco locale.</
font></td></tr>" b-WasTableFormat="TRUE" --><!--
#include file="_fpclass/fpdblib.inc"-->
<%
fp_sQry="SELECT * FROM ArchivioUk49s ORDER BY Estr DESC"
fp_sDefault=""
fp_sNoRecords="<tr><td colspan=9 align=left width=""100%"">Nessun
record restituito.</td></tr>"
fp_sDataConn="Database5"
fp_iMaxRecords=0
fp_iCommandType=1
fp_iPageSize=25
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice="Estr"
fp_sMenuValue="Estr"
fp_iDisplayCols=9
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="_fpclass/fpdbrgn1.inc"-->
<!--webbot bot="DatabaseRegionStart" i-CheckSum="63537" endspan -->
<tr>
<td><!--webbot bot="DatabaseResultColumn" startspan
s-columnnames="Estr,Data,E1,E2,E3,E4,E5,E6,Jolly" s-
column="Estr"
b-tableformat="TRUE" b-hasHTML="FALSE" clientside
local_preview="<font
size="-1">&lt;&lt;</font>Estr<font
size="-1">&gt;&gt;</font>"
preview="<font size="-1">&lt;&lt;</
font>Estr<font size="-1">&gt;&gt;</
font>" --><%=FP_FieldVal(fp_rs,"Estr")%><!--webbot
bot="DatabaseResultColumn" i-CheckSum="5661" endspan -->
</td>
<td><!--webbot bot="DatabaseResultColumn" startspan
s-columnnames="Estr,Data,E1,E2,E3,E4,E5,E6,Jolly" s-
column="Data"
b-tableformat="TRUE" b-hasHTML="FALSE" clientside
local_preview="<font
size="-1">&lt;&lt;</font>Data<font
size="-1">&gt;&gt;</font>"
preview="<font size="-1">&lt;&lt;</
font>Data<font size="-1">&gt;&gt;</
font>" --><%=FP_FieldVal(fp_rs,"Data")%><!--webbot
bot="DatabaseResultColumn" i-CheckSum="3259" endspan -->
</td>
<td align="center"><!--webbot bot="DatabaseResultColumn"
startspan
s-columnnames="Estr,Data,E1,E2,E3,E4,E5,E6,Jolly" s-
column="E1"
b-tableformat="TRUE" b-hasHTML="FALSE" clientside
local_preview="<font
size="-1">&lt;&lt;</font>E1<font
size="-1">&gt;&gt;</font>"
preview="<font size="-1">&lt;&lt;</
font>E1<font size="-1">&gt;&gt;</
font>" --><%=FP_FieldVal(fp_rs,"E1")%><!--webbot
bot="DatabaseResultColumn" i-CheckSum="60125" endspan -->
</td>
<td align="center"><!--webbot bot="DatabaseResultColumn"
startspan
s-columnnames="Estr,Data,E1,E2,E3,E4,E5,E6,Jolly" s-
column="E2"
b-tableformat="TRUE" b-hasHTML="FALSE" clientside
local_preview="<font
size="-1">&lt;&lt;</font>E2<font
size="-1">&gt;&gt;</font>"
preview="<font size="-1">&lt;&lt;</
font>E2<font size="-1">&gt;&gt;</
font>" --><%=FP_FieldVal(fp_rs,"E2")%><!--webbot
bot="DatabaseResultColumn" i-CheckSum="60253" endspan -->
</td>
<td align="center"><!--webbot bot="DatabaseResultColumn"
startspan
s-columnnames="Estr,Data,E1,E2,E3,E4,E5,E6,Jolly" s-
column="E3"
b-tableformat="TRUE" b-hasHTML="FALSE" clientside
local_preview="<font
size="-1">&lt;&lt;</font>E3<font
size="-1">&gt;&gt;</font>"
preview="<font size="-1">&lt;&lt;</
font>E3<font size="-1">&gt;&gt;</
font>" --><%=FP_FieldVal(fp_rs,"E3")%><!--webbot
bot="DatabaseResultColumn" i-CheckSum="60381" endspan -->
</td>
<td align="center"><!--webbot bot="DatabaseResultColumn"
startspan
s-columnnames="Estr,Data,E1,E2,E3,E4,E5,E6,Jolly" s-
column="E4"
b-tableformat="TRUE" b-hasHTML="FALSE" clientside
local_preview="<font
size="-1">&lt;&lt;</font>E4<font
size="-1">&gt;&gt;</font>"
preview="<font size="-1">&lt;&lt;</
font>E4<font size="-1">&gt;&gt;</
font>" --><%=FP_FieldVal(fp_rs,"E4")%><!--webbot
bot="DatabaseResultColumn" i-CheckSum="60509" endspan -->
</td>
<td align="center"><!--webbot bot="DatabaseResultColumn"
startspan
s-columnnames="Estr,Data,E1,E2,E3,E4,E5,E6,Jolly" s-
column="E5"
b-tableformat="TRUE" b-hasHTML="FALSE" clientside
local_preview="<font
size="-1">&lt;&lt;</font>E5<font
size="-1">&gt;&gt;</font>"
preview="<font size="-1">&lt;&lt;</
font>E5<font size="-1">&gt;&gt;</
font>" --><%=FP_FieldVal(fp_rs,"E5")%><!--webbot
bot="DatabaseResultColumn" i-CheckSum="60637" endspan -->
</td>
<td align="center"><!--webbot bot="DatabaseResultColumn"
startspan
s-columnnames="Estr,Data,E1,E2,E3,E4,E5,E6,Jolly" s-
column="E6"
b-tableformat="TRUE" b-hasHTML="FALSE" clientside
local_preview="<font
size="-1">&lt;&lt;</font>E6<font
size="-1">&gt;&gt;</font>"
preview="<font size="-1">&lt;&lt;</
font>E6<font size="-1">&gt;&gt;</
font>" --><%=FP_FieldVal(fp_rs,"E6")%><!--webbot
bot="DatabaseResultColumn" i-CheckSum="60765" endspan -->
</td>
<td align="center"><!--webbot bot="DatabaseResultColumn"
startspan
s-columnnames="Estr,Data,E1,E2,E3,E4,E5,E6,Jolly" s-
column="Jolly"
b-tableformat="TRUE" b-hasHTML="FALSE" clientside
local_preview="<font
size="-1">&lt;&lt;</font>Jolly<font
size="-1">&gt;&gt;</font>"
preview="<font size="-1">&lt;&lt;</
font>Jolly<font size="-1">&gt;&gt;</
font>" --><%=FP_FieldVal(fp_rs,"Jolly")%><!--webbot
bot="DatabaseResultColumn" i-CheckSum="8973" endspan -->
</td>
</tr>
<!--webbot bot="DatabaseRegionEnd" startspan b-tableformat="TRUE"
b-menuformat="FALSE" u-dbrgn2="_fpclass/fpdbrgn2.inc" i-
groupsize="25"
clientside tag="TBODY"
local_preview="<tr><td colspan=64
bgcolor="#FFFF00" align="left" width="
100%"><font color="#000000">Fine dell'area
risultati database.</font></td></tr><TR><TD
ALIGN=LEFT VALIGN=MIDDLE
COLSPAN=64><FORM><NOBR><INPUT TYPE=Button
VALUE=" |< "><INPUT TYPE=Button VALUE="
< "><INPUT TYPE=Button VALUE=" >
"><INPUT TYPE=Button VALUE=" >| ">
[1/25]</NOBR></FORM></td></tr>"
preview="<tr><td colspan=64 bgcolor="#FFFF00"
align="left" width="100%"><font
color="#000000">Fine dell'area risultati database.</
font></td></tr><TR><TD ALIGN=LEFT
VALIGN=MIDDLE COLSPAN=64><NOBR><INPUT TYPE=Button
VALUE=" |< "><INPUT TYPE=Button VALUE="
< "><INPUT TYPE=Button VALUE=" >
"><INPUT TYPE=Button VALUE=" >| ">
[1/25]</NOBR><BR></td></tr>" --><!--#include
file="_fpclass/fpdbrgn2.inc"-->
<!--webbot bot="DatabaseRegionEnd" i-CheckSum="62730" endspan -->
</tbody>
</table> </body>
</html>