Forcing cells to be formatted as numbers for Excel.

This was required after a strange error began occuring where all cells after the 42nd row would begin being formatted as text, regardless of the formatting you specify and number value. Inserting the =Sum formula seemed to resolve the problem and the totals work correctly.
LotusScript


Print "<tr>" & _
"<td>" & Country & "</td>" & _
"<td>" & Office & "</td>" & _
"<td style='vnd.ms-excel.numberformat:#,##0.00_)[semicolon][Red](#,##0.00)'>" & "=Sum(" & CompTotal & ")" & "</td>" & _
"<td style='vnd.ms-excel.numberformat:#,##0.00_)[semicolon][Red](#,##0.00)'>" & "=Sum(" & ConsTotal & ")" & "</td>" & _
"<td style='vnd.ms-excel.numberformat:#,##0.00_)[semicolon][Red](#,##0.00)'>" & "=Sum(" & ExpensesTotal & ")" & "</td>" & _
"<td style='vnd.ms-excel.numberformat:#,##0.00_)[semicolon][Red](#,##0.00)'>" & "=Sum(" & VATTotal & ")" & "</td>" & _
"<td style='vnd.ms-excel.numberformat:#,##0.00_)[semicolon][Red](#,##0.00)'>" & "=Sum(" & TotalFeesTotal  & ")" & "</td>" & _
"<td style='vnd.ms-excel.numberformat:#,##0.00_)[semicolon][Red](#,##0.00)'>" & "=Sum(" & Round(Estimated,0) & ")" & "</td>" & _
"<td style='vnd.ms-excel.numberformat:#,##0.00_)[semicolon][Red](#,##0.00)'>" & "=Sum(" & Round(Actual,0) & ")" & "</td>" & _
"<td style='vnd.ms-excel.numberformat:#,##0.00_)[semicolon][Red](#,##0.00)'>" & "=Sum(" & Round(Difference, 0) & ")" & "</td>" & _
"<td>" & Reason & "</td>" & _
"</tr>"		

Posted by fbrefere001 on Wednesday July 14, 2004