EDN Admin
Well-known member
I am able to create an excel sheet out of a datatable through xml.
In my datatable I have 52 columns for weeks en and also 52 columns for keeping a status.
Now i have 3 status in string format: 2,3,4.
For status 2 i want the excel cell to have a yellow background, for status 3 I want the cell to have a green background and sts 4 must have a red background.
How can I do this with a If() statement in XML? underneith I pasted in a sample of my XML document. For two status I used if("test",true, false), but now I have 3 status. What do I have to do now?
Thanx in advance.
<div style="color:Black;background-color:White; <pre>
<%= From r In Enumerable.Range(0, t.Rows.Count) _
Select <span style="color:Blue; <<span style="color:#A31515; Row<span style="color:Blue; >
<%= <span style="color:Blue; <<span style="color:#A31515; Cell<span style="color:Blue; ><span style="color:Blue; <<span style="color:#A31515; Data <span style="color:Red; ss:Type<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; String<span style="color:Black; "<span style="color:Blue; ><%= t.Rows(r)(0) %><span style="color:Blue; </<span style="color:#A31515; Data<span style="color:Blue; ><span style="color:Blue; </<span style="color:#A31515; Cell<span style="color:Blue; > %>
<%= <span style="color:Blue; <<span style="color:#A31515; Cell<span style="color:Blue; ><span style="color:Blue; <<span style="color:#A31515; Data <span style="color:Red; ss:Type<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; String<span style="color:Black; "<span style="color:Blue; ><%= t.Rows(r)(1) %><span style="color:Blue; </<span style="color:#A31515; Data<span style="color:Blue; ><span style="color:Blue; </<span style="color:#A31515; Cell<span style="color:Blue; > %>
<%= <span style="color:Blue; <<span style="color:#A31515; Cell<span style="color:Blue; ><span style="color:Blue; <<span style="color:#A31515; Data <span style="color:Red; ss:Type<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; String<span style="color:Black; "<span style="color:Blue; ><%= t.Rows(r)(2) %><span style="color:Blue; </<span style="color:#A31515; Data<span style="color:Blue; ><span style="color:Blue; </<span style="color:#A31515; Cell<span style="color:Blue; > %>
<%= <span style="color:Blue; <<span style="color:#A31515; Cell<span style="color:Blue; ><span style="color:Blue; <<span style="color:#A31515; Data <span style="color:Red; ss:Type<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; String<span style="color:Black; "<span style="color:Blue; ><%= t.Rows(r)(3) %><span style="color:Blue; </<span style="color:#A31515; Data<span style="color:Blue; ><span style="color:Blue; </<span style="color:#A31515; Cell<span style="color:Blue; > %>
<%= <span style="color:Blue; <<span style="color:#A31515; Cell<span style="color:Blue; ><span style="color:Blue; <<span style="color:#A31515; Data <span style="color:Red; ss:Type<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; String<span style="color:Black; "<span style="color:Blue; ><%= t.Rows(r)(4) %><span style="color:Blue; </<span style="color:#A31515; Data<span style="color:Blue; ><span style="color:Blue; </<span style="color:#A31515; Cell<span style="color:Blue; > %>
<%= <span style="color:Blue; <<span style="color:#A31515; Cell <span style="color:Red; ss:StyleID<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; s63<span style="color:Black; "<span style="color:Blue; ><span style="color:Blue; <<span style="color:#A31515; Data <span style="color:Red; ss:Type<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; Number<span style="color:Black; "<span style="color:Blue; ><%= t.Rows(r)(5) %><span style="color:Blue; </<span style="color:#A31515; Data<span style="color:Blue; ><span style="color:Blue; </<span style="color:#A31515; Cell<span style="color:Blue; > %>
<%= <span style="color:Blue; <<span style="color:#A31515; Cell <span style="color:Red; ss:StyleID<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; s63<span style="color:Black; "<span style="color:Blue; ><span style="color:Blue; <<span style="color:#A31515; Data <span style="color:Red; ss:Type<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; Number<span style="color:Black; "<span style="color:Blue; ><%= t.Rows(r)(6) %><span style="color:Blue; </<span style="color:#A31515; Data<span style="color:Blue; ><span style="color:Blue; </<span style="color:#A31515; Cell<span style="color:Blue; > %>
<%= <span style="color:Blue; <<span style="color:#A31515; Cell <span style="color:Red; ss:StyleID<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; s63<span style="color:Black; "<span style="color:Blue; ><span style="color:Blue; <<span style="color:#A31515; Data <span style="color:Red; ss:Type<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; Number<span style="color:Black; "<span style="color:Blue; ><%= t.Rows(r)(7) %><span style="color:Blue; </<span style="color:#A31515; Data<span style="color:Blue; ><span style="color:Blue; </<span style="color:#A31515; Cell<span style="color:Blue; > %>
<%= <span style="color:Blue; <<span style="color:#A31515; Cell <span style="color:Red; ss:StyleID<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; s63<span style="color:Black; "<span style="color:Blue; ><span style="color:Blue; <<span style="color:#A31515; Data <span style="color:Red; ss:Type<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; Number<span style="color:Black; "<span style="color:Blue; ><%= t.Rows(r)(8) %><span style="color:Blue; </<span style="color:#A31515; Data<span style="color:Blue; ><span style="color:Blue; </<span style="color:#A31515; Cell<span style="color:Blue; > %>
<%= <span style="color:Blue; <<span style="color:#A31515; Cell <span style="color:Red; ss:StyleID<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; s63<span style="color:Black; "<span style="color:Blue; ><span style="color:Blue; <<span style="color:#A31515; Data <span style="color:Red; ss:Type<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; Number<span style="color:Black; "<span style="color:Blue; ><%= t.Rows(r)(9) %><span style="color:Blue; </<span style="color:#A31515; Data<span style="color:Blue; ><span style="color:Blue; </<span style="color:#A31515; Cell<span style="color:Blue; > %>
<%= If(t.Rows(r)(10) > 0, <span style="color:Blue; <<span style="color:#A31515; Cell <span style="color:Red; ss:StyleID<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; s55<span style="color:Black; "<span style="color:Blue; ><span style="color:Blue; <<span style="color:#A31515; Data <span style="color:Red; ss:Type<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; Number<span style="color:Black; "<span style="color:Blue; ><%= t.Rows(r)(10) %><span style="color:Blue; </<span style="color:#A31515; Data<span style="color:Blue; ><span style="color:Blue; </<span style="color:#A31515; Cell<span style="color:Blue; >, <span style="color:Blue; <<span style="color:#A31515; Cell <span style="color:Red; ss:StyleID<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; s59<span style="color:Black; "<span style="color:Blue; ><span style="color:Blue; <<span style="color:#A31515; Data <span style="color:Red; ss:Type<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; Number<span style="color:Black; "<span style="color:Blue; ><%= t.Rows(r)(10) %><span style="color:Blue; </<span style="color:#A31515; Data<span style="color:Blue; ><span style="color:Blue; </<span style="color:#A31515; Cell<span style="color:Blue; >) %>
<%= If(t.Rows(r)(11) > 0, <span style="color:Blue; <<span style="color:#A31515; Cell <span style="color:Red; ss:StyleID<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; s56<span style="color:Black; "<span style="color:Blue; ><span style="color:Blue; <<span style="color:#A31515; Data <span style="color:Red; ss:Type<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; Number<span style="color:Black; "<span style="color:Blue; ><%= t.Rows(r)(11) %><span style="color:Blue; </<span style="color:#A31515; Data<span style="color:Blue; ><span style="color:Blue; </<span style="color:#A31515; Cell<span style="color:Blue; >, <span style="color:Blue; <<span style="color:#A31515; Cell <span style="color:Red; ss:StyleID<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; s59<span style="color:Black; "<span style="color:Blue; ><span style="color:Blue; <<span style="color:#A31515; Data <span style="color:Red; ss:Type<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; Number<span style="color:Black; "<span style="color:Blue; ><%= t.Rows(r)(11) %><span style="color:Blue; </<span style="color:#A31515; Data<span style="color:Blue; ><span style="color:Blue; </<span style="color:#A31515; Cell<span style="color:Blue; >) %>
<%= If(t.Rows(r)(13) = "2", <span style="color:Blue; <<span style="color:#A31515; Cell <span style="color:Red; ss:StyleID<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; s56<span style="color:Black; "<span style="color:Blue; ><span style="color:Blue; <<span style="color:#A31515; Data <span style="color:Red; ss:Type<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; Number<span style="color:Black; "<span style="color:Blue; ><%= t.Rows(r)(12) %><span style="color:Blue; </<span style="color:#A31515; Data<span style="color:Blue; ><span style="color:Blue; </<span style="color:#A31515; Cell<span style="color:Blue; >, <span style="color:Blue; <<span style="color:#A31515; Cell <span style="color:Red; ss:StyleID<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; s59<span style="color:Black; "<span style="color:Blue; ><span style="color:Blue; <<span style="color:#A31515; Data <span style="color:Red; ss:Type<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; Number<span style="color:Black; "<span style="color:Blue; ><%= t.Rows(r)(12) %><span style="color:Blue; </<span style="color:#A31515; Data<span style="color:Blue; ><span style="color:Blue; </<span style="color:#A31515; Cell<span style="color:Blue; >) %>
<%= If(t.Rows(r)(13) = "3", <span style="color:Blue; <<span style="color:#A31515; Cell <span style="color:Red; ss:StyleID<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; s66<span style="color:Black; "<span style="color:Blue; ><span style="color:Blue; <<span style="color:#A31515; Data <span style="color:Red; ss:Type<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; Number<span style="color:Black; "<span style="color:Blue; ><%= t.Rows(r)(12) %><span style="color:Blue; </<span style="color:#A31515; Data<span style="color:Blue; ><span style="color:Blue; </<span style="color:#A31515; Cell<span style="color:Blue; >, <span style="color:Blue; <<span style="color:#A31515; Cell <span style="color:Red; ss:StyleID<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; s59<span style="color:Black; "<span style="color:Blue; ><span style="color:Blue; <<span style="color:#A31515; Data <span style="color:Red; ss:Type<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; Number<span style="color:Black; "<span style="color:Blue; ><%= t.Rows(r)(12) %><span style="color:Blue; </<span style="color:#A31515; Data<span style="color:Blue; ><span style="color:Blue; </<span style="color:#A31515; Cell<span style="color:Blue; >) %>
<%= If(t.Rows(r)(13) = "4", <span style="color:Blue; <<span style="color:#A31515; Cell <span style="color:Red; ss:StyleID<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; s67<span style="color:Black; "<span style="color:Blue; ><span style="color:Blue; <<span style="color:#A31515; Data <span style="color:Red; ss:Type<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; Number<span style="color:Black; "<span style="color:Blue; ><%= t.Rows(r)(12) %><span style="color:Blue; </<span style="color:#A31515; Data<span style="color:Blue; ><span style="color:Blue; </<span style="color:#A31515; Cell<span style="color:Blue; >, <span style="color:Blue; <<span style="color:#A31515; Cell <span style="color:Red; ss:StyleID<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; s59<span style="color:Black; "<span style="color:Blue; ><span style="color:Blue; <<span style="color:#A31515; Data <span style="color:Red; ss:Type<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; Number<span style="color:Black; "<span style="color:Blue; ><%= t.Rows(r)(12) %><span style="color:Blue; </<span style="color:#A31515; Data<span style="color:Blue; ><span style="color:Blue; </<span style="color:#A31515; Cell<span style="color:Blue; >) %>
<%= If(t.Rows(r)(15) = "2", <span style="color:Blue; <<span style="color:#A31515; Cell <span style="color:Red; ss:StyleID<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; s56<span style="color:Black; "<span style="color:Blue; ><span style="color:Blue; <<span style="color:#A31515; Data <span style="color:Red; ss:Type<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; Number<span style="color:Black; "<span style="color:Blue; ><%= t.Rows(r)(14) %><span style="color:Blue; </<span style="color:#A31515; Data<span style="color:Blue; ><span style="color:Blue; </<span style="color:#A31515; Cell<span style="color:Blue; >, <span style="color:Blue; <<span style="color:#A31515; Cell <span style="color:Red; ss:StyleID<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; s59<span style="color:Black; "<span style="color:Blue; ><span style="color:Blue; <<span style="color:#A31515; Data <span style="color:Red; ss:Type<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; Number<span style="color:Black; "<span style="color:Blue; ><%= t.Rows(r)(14) %><span style="color:Blue; </<span style="color:#A31515; Data<span style="color:Blue; ><span style="color:Blue; </<span style="color:#A31515; Cell<span style="color:Blue; >) %>
<%= If(t.Rows(r)(15) = "3", <span style="color:Blue; <<span style="color:#A31515; Cell <span style="color:Red; ss:StyleID<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; s66<span style="color:Black; "<span style="color:Blue; ><span style="color:Blue; <<span style="color:#A31515; Data <span style="color:Red; ss:Type<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; Number<span style="color:Black; "<span style="color:Blue; ><%= t.Rows(r)(14) %><span style="color:Blue; </<span style="color:#A31515; Data<span style="color:Blue; ><span style="color:Blue; </<span style="color:#A31515; Cell<span style="color:Blue; >, <span style="color:Blue; <<span style="color:#A31515; Cell <span style="color:Red; ss:StyleID<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; s59<span style="color:Black; "<span style="color:Blue; ><span style="color:Blue; <<span style="color:#A31515; Data <span style="color:Red; ss:Type<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; Number<span style="color:Black; "<span style="color:Blue; ><%= t.Rows(r)(14) %><span style="color:Blue; </<span style="color:#A31515; Data<span style="color:Blue; ><span style="color:Blue; </<span style="color:#A31515; Cell<span style="color:Blue; >) %>
<%= If(t.Rows(r)(15) = "4", <span style="color:Blue; <<span style="color:#A31515; Cell <span style="color:Red; ss:StyleID<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; s67<span style="color:Black; "<span style="color:Blue; ><span style="color:Blue; <<span style="color:#A31515; Data <span style="color:Red; ss:Type<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; Number<span style="color:Black; "<span style="color:Blue; ><%= t.Rows(r)(14) %><span style="color:Blue; </<span style="color:#A31515; Data<span style="color:Blue; ><span style="color:Blue; </<span style="color:#A31515; Cell<span style="color:Blue; >, <span style="color:Blue; <<span style="color:#A31515; Cell <span style="color:Red; ss:StyleID<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; s59<span style="color:Black; "<span style="color:Blue; ><span style="color:Blue; <<span style="color:#A31515; Data <span style="color:Red; ss:Type<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; Number<span style="color:Black; "<span style="color:Blue; ><%= t.Rows(r)(14) %><span style="color:Blue; </<span style="color:#A31515; Data<span style="color:Blue; ><span style="color:Blue; </<span style="color:#A31515; Cell<span style="color:Blue; >) %>
<%= If(t.Rows(r)(17) = "2", <span style="color:Blue; <<span style="color:#A31515; Cell <span style="color:Red; ss:StyleID<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; s56<span style="color:Black; "<span style="color:Blue; ><span style="color:Blue; <<span style="color:#A31515; Data <span style="color:Red; ss:Type<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; Number<span style="color:Black; "<span style="color:Blue; ><%= t.Rows(r)(16) %><span style="color:Blue; </<span style="color:#A31515; Data<span style="color:Blue; ><span style="color:Blue; </<span style="color:#A31515; Cell<span style="color:Blue; >, <span style="color:Blue; <<span style="color:#A31515; Cell <span style="color:Red; ss:StyleID<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; s59<span style="color:Black; "<span style="color:Blue; ><span style="color:Blue; <<span style="color:#A31515; Data <span style="color:Red; ss:Type<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; Number<span style="color:Black; "<span style="color:Blue; ><%= t.Rows(r)(16) %><span style="color:Blue; </<span style="color:#A31515; Data<span style="color:Blue; ><span style="color:Blue; </<span style="color:#A31515; Cell<span style="color:Blue; >) %>
<%= If(t.Rows(r)(17) = "3", <span style="color:Blue; <<span style="color:#A31515; Cell <span style="color:Red; ss:StyleID<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; s66<span style="color:Black; "<span style="color:Blue; ><span style="color:Blue; <<span style="color:#A31515; Data <span style="color:Red; ss:Type<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; Number<span style="color:Black; "<span style="color:Blue; ><%= t.Rows(r)(16) %><span style="color:Blue; </<span style="color:#A31515; Data<span style="color:Blue; ><span style="color:Blue; </<span style="color:#A31515; Cell<span style="color:Blue; >, <span style="color:Blue; <<span style="color:#A31515; Cell <span style="color:Red; ss:StyleID<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; s59<span style="color:Black; "<span style="color:Blue; ><span style="color:Blue; <<span style="color:#A31515; Data <span style="color:Red; ss:Type<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; Number<span style="color:Black; "<span style="color:Blue; ><%= t.Rows(r)(16) %><span style="color:Blue; </<span style="color:#A31515; Data<span style="color:Blue; ><span style="color:Blue; </<span style="color:#A31515; Cell<span style="color:Blue; >) %>
<%= If(t.Rows(r)(17) = "4", <span style="color:Blue; <<span style="color:#A31515; Cell <span style="color:Red; ss:StyleID<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; s67<span style="color:Black; "<span style="color:Blue; ><span style="color:Blue; <<span style="color:#A31515; Data <span style="color:Red; ss:Type<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; Number<span style="color:Black; "<span style="color:Blue; ><%= t.Rows(r)(16) %><span style="color:Blue; </<span style="color:#A31515; Data<span style="color:Blue; ><span style="color:Blue; </<span style="color:#A31515; Cell<span style="color:Blue; >, <span style="color:Blue; <<span style="color:#A31515; Cell <span style="color:Red; ss:StyleID<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; s59<span style="color:Black; "<span style="color:Blue; ><span style="color:Blue; <<span style="color:#A31515; Data <span style="color:Red; ss:Type<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; Number<span style="color:Black; "<span style="color:Blue; ><%= t.Rows(r)(16) %><span style="color:Blue; </<span style="color:#A31515; Data<span style="color:Blue; ><span style="color:Blue; </<span style="color:#A31515; Cell<span style="color:Blue; >) %>
<span style="color:Blue; </<span style="color:#A31515; Row<span style="color:Blue; > %>
<span style="color:Blue; </<span style="color:#A31515; Table<span style="color:Blue; >
<span style="color:Blue; </<span style="color:#A31515; Worksheet<span style="color:Blue; > %>
<span style="color:Blue; <<span style="color:#A31515; WorksheetOptions <span style="color:Red; xmlns<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; urn:schemas-microsoft-comffice:excel<span style="color:Black; "<span style="color:Blue; >
<span style="color:Blue; <<span style="color:#A31515; Selected<span style="color:Blue; />
<span style="color:Blue; <<span style="color:#A31515; FreezePanes<span style="color:Blue; />
<span style="color:Blue; <<span style="color:#A31515; FrozenNoSplit<span style="color:Blue; />
<span style="color:Blue; <<span style="color:#A31515; SplitHorizontal<span style="color:Blue; >1<span style="color:Blue; </<span style="color:#A31515; SplitHorizontal<span style="color:Blue; >
<span style="color:Blue; <<span style="color:#A31515; TopRowBottomPane<span style="color:Blue; >1<span style="color:Blue; </<span style="color:#A31515; TopRowBottomPane<span style="color:Blue; >
<span style="color:Blue; <<span style="color:#A31515; PageSetup<span style="color:Blue; >
<span style="color:Blue; <<span style="color:#A31515; Header <span style="color:Red; x:Margin<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; 0.3<span style="color:Black; "<span style="color:Blue; />
<span style="color:Blue; <<span style="color:#A31515; Footer <span style="color:Red; x:Margin<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; 0.3<span style="color:Black; "<span style="color:Blue; />
<span style="color:Blue; <<span style="color:#A31515; PageMargins <span style="color:Red; x:Bottom<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; 0.75<span style="color:Black; " <span style="color:Red; x:Left<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; 0.7<span style="color:Black; " <span style="color:Red; x:Right<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; 0.7<span style="color:Black; " <span style="color:Red; x:Top<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; 0.75<span style="color:Black; "<span style="color:Blue; />
<span style="color:Blue; </<span style="color:#A31515; PageSetup<span style="color:Blue; >
<span style="color:Blue; <<span style="color:#A31515; Print<span style="color:Blue; >
<span style="color:Blue; <<span style="color:#A31515; ValidPrinterInfo<span style="color:Blue; />
<span style="color:Blue; <<span style="color:#A31515; HorizontalResolution<span style="color:Blue; >300<span style="color:Blue; </<span style="color:#A31515; HorizontalResolution<span style="color:Blue; >
<span style="color:Blue; <<span style="color:#A31515; VerticalResolution<span style="color:Blue; >300<span style="color:Blue; </<span style="color:#A31515; VerticalResolution<span style="color:Blue; >
<span style="color:Blue; </<span style="color:#A31515; Print<span style="color:Blue; >
<span style="color:Blue; <<span style="color:#A31515; Panes<span style="color:Blue; >
<span style="color:Blue; <<span style="color:#A31515; Pane<span style="color:Blue; >
<span style="color:Blue; <<span style="color:#A31515; Number<span style="color:Blue; >3<span style="color:Blue; </<span style="color:#A31515; Number<span style="color:Blue; >
<span style="color:Blue; <<span style="color:#A31515; ActiveCol<span style="color:Blue; >2<span style="color:Blue; </<span style="color:#A31515; ActiveCol<span style="color:Blue; >
<span style="color:Blue; </<span style="color:#A31515; Pane<span style="color:Blue; >
<span style="color:Blue; </<span style="color:#A31515; Panes<span style="color:Blue; >
<span style="color:Blue; <<span style="color:#A31515; ProtectObjects<span style="color:Blue; >False<span style="color:Blue; </<span style="color:#A31515; ProtectObjects<span style="color:Blue; >
<span style="color:Blue; <<span style="color:#A31515; ProtectScenarios<span style="color:Blue; >False<span style="color:Blue; </<span style="color:#A31515; ProtectScenarios<span style="color:Blue; >
<span style="color:Blue; </<span style="color:#A31515; WorksheetOptions<span style="color:Blue; >
<span style="color:Blue; </<span style="color:#A31515; Workbook<span style="color:Blue; >
Return sheet
[/code]
View the full article
In my datatable I have 52 columns for weeks en and also 52 columns for keeping a status.
Now i have 3 status in string format: 2,3,4.
For status 2 i want the excel cell to have a yellow background, for status 3 I want the cell to have a green background and sts 4 must have a red background.
How can I do this with a If() statement in XML? underneith I pasted in a sample of my XML document. For two status I used if("test",true, false), but now I have 3 status. What do I have to do now?
Thanx in advance.
<div style="color:Black;background-color:White; <pre>
<%= From r In Enumerable.Range(0, t.Rows.Count) _
Select <span style="color:Blue; <<span style="color:#A31515; Row<span style="color:Blue; >
<%= <span style="color:Blue; <<span style="color:#A31515; Cell<span style="color:Blue; ><span style="color:Blue; <<span style="color:#A31515; Data <span style="color:Red; ss:Type<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; String<span style="color:Black; "<span style="color:Blue; ><%= t.Rows(r)(0) %><span style="color:Blue; </<span style="color:#A31515; Data<span style="color:Blue; ><span style="color:Blue; </<span style="color:#A31515; Cell<span style="color:Blue; > %>
<%= <span style="color:Blue; <<span style="color:#A31515; Cell<span style="color:Blue; ><span style="color:Blue; <<span style="color:#A31515; Data <span style="color:Red; ss:Type<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; String<span style="color:Black; "<span style="color:Blue; ><%= t.Rows(r)(1) %><span style="color:Blue; </<span style="color:#A31515; Data<span style="color:Blue; ><span style="color:Blue; </<span style="color:#A31515; Cell<span style="color:Blue; > %>
<%= <span style="color:Blue; <<span style="color:#A31515; Cell<span style="color:Blue; ><span style="color:Blue; <<span style="color:#A31515; Data <span style="color:Red; ss:Type<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; String<span style="color:Black; "<span style="color:Blue; ><%= t.Rows(r)(2) %><span style="color:Blue; </<span style="color:#A31515; Data<span style="color:Blue; ><span style="color:Blue; </<span style="color:#A31515; Cell<span style="color:Blue; > %>
<%= <span style="color:Blue; <<span style="color:#A31515; Cell<span style="color:Blue; ><span style="color:Blue; <<span style="color:#A31515; Data <span style="color:Red; ss:Type<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; String<span style="color:Black; "<span style="color:Blue; ><%= t.Rows(r)(3) %><span style="color:Blue; </<span style="color:#A31515; Data<span style="color:Blue; ><span style="color:Blue; </<span style="color:#A31515; Cell<span style="color:Blue; > %>
<%= <span style="color:Blue; <<span style="color:#A31515; Cell<span style="color:Blue; ><span style="color:Blue; <<span style="color:#A31515; Data <span style="color:Red; ss:Type<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; String<span style="color:Black; "<span style="color:Blue; ><%= t.Rows(r)(4) %><span style="color:Blue; </<span style="color:#A31515; Data<span style="color:Blue; ><span style="color:Blue; </<span style="color:#A31515; Cell<span style="color:Blue; > %>
<%= <span style="color:Blue; <<span style="color:#A31515; Cell <span style="color:Red; ss:StyleID<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; s63<span style="color:Black; "<span style="color:Blue; ><span style="color:Blue; <<span style="color:#A31515; Data <span style="color:Red; ss:Type<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; Number<span style="color:Black; "<span style="color:Blue; ><%= t.Rows(r)(5) %><span style="color:Blue; </<span style="color:#A31515; Data<span style="color:Blue; ><span style="color:Blue; </<span style="color:#A31515; Cell<span style="color:Blue; > %>
<%= <span style="color:Blue; <<span style="color:#A31515; Cell <span style="color:Red; ss:StyleID<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; s63<span style="color:Black; "<span style="color:Blue; ><span style="color:Blue; <<span style="color:#A31515; Data <span style="color:Red; ss:Type<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; Number<span style="color:Black; "<span style="color:Blue; ><%= t.Rows(r)(6) %><span style="color:Blue; </<span style="color:#A31515; Data<span style="color:Blue; ><span style="color:Blue; </<span style="color:#A31515; Cell<span style="color:Blue; > %>
<%= <span style="color:Blue; <<span style="color:#A31515; Cell <span style="color:Red; ss:StyleID<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; s63<span style="color:Black; "<span style="color:Blue; ><span style="color:Blue; <<span style="color:#A31515; Data <span style="color:Red; ss:Type<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; Number<span style="color:Black; "<span style="color:Blue; ><%= t.Rows(r)(7) %><span style="color:Blue; </<span style="color:#A31515; Data<span style="color:Blue; ><span style="color:Blue; </<span style="color:#A31515; Cell<span style="color:Blue; > %>
<%= <span style="color:Blue; <<span style="color:#A31515; Cell <span style="color:Red; ss:StyleID<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; s63<span style="color:Black; "<span style="color:Blue; ><span style="color:Blue; <<span style="color:#A31515; Data <span style="color:Red; ss:Type<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; Number<span style="color:Black; "<span style="color:Blue; ><%= t.Rows(r)(8) %><span style="color:Blue; </<span style="color:#A31515; Data<span style="color:Blue; ><span style="color:Blue; </<span style="color:#A31515; Cell<span style="color:Blue; > %>
<%= <span style="color:Blue; <<span style="color:#A31515; Cell <span style="color:Red; ss:StyleID<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; s63<span style="color:Black; "<span style="color:Blue; ><span style="color:Blue; <<span style="color:#A31515; Data <span style="color:Red; ss:Type<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; Number<span style="color:Black; "<span style="color:Blue; ><%= t.Rows(r)(9) %><span style="color:Blue; </<span style="color:#A31515; Data<span style="color:Blue; ><span style="color:Blue; </<span style="color:#A31515; Cell<span style="color:Blue; > %>
<%= If(t.Rows(r)(10) > 0, <span style="color:Blue; <<span style="color:#A31515; Cell <span style="color:Red; ss:StyleID<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; s55<span style="color:Black; "<span style="color:Blue; ><span style="color:Blue; <<span style="color:#A31515; Data <span style="color:Red; ss:Type<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; Number<span style="color:Black; "<span style="color:Blue; ><%= t.Rows(r)(10) %><span style="color:Blue; </<span style="color:#A31515; Data<span style="color:Blue; ><span style="color:Blue; </<span style="color:#A31515; Cell<span style="color:Blue; >, <span style="color:Blue; <<span style="color:#A31515; Cell <span style="color:Red; ss:StyleID<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; s59<span style="color:Black; "<span style="color:Blue; ><span style="color:Blue; <<span style="color:#A31515; Data <span style="color:Red; ss:Type<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; Number<span style="color:Black; "<span style="color:Blue; ><%= t.Rows(r)(10) %><span style="color:Blue; </<span style="color:#A31515; Data<span style="color:Blue; ><span style="color:Blue; </<span style="color:#A31515; Cell<span style="color:Blue; >) %>
<%= If(t.Rows(r)(11) > 0, <span style="color:Blue; <<span style="color:#A31515; Cell <span style="color:Red; ss:StyleID<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; s56<span style="color:Black; "<span style="color:Blue; ><span style="color:Blue; <<span style="color:#A31515; Data <span style="color:Red; ss:Type<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; Number<span style="color:Black; "<span style="color:Blue; ><%= t.Rows(r)(11) %><span style="color:Blue; </<span style="color:#A31515; Data<span style="color:Blue; ><span style="color:Blue; </<span style="color:#A31515; Cell<span style="color:Blue; >, <span style="color:Blue; <<span style="color:#A31515; Cell <span style="color:Red; ss:StyleID<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; s59<span style="color:Black; "<span style="color:Blue; ><span style="color:Blue; <<span style="color:#A31515; Data <span style="color:Red; ss:Type<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; Number<span style="color:Black; "<span style="color:Blue; ><%= t.Rows(r)(11) %><span style="color:Blue; </<span style="color:#A31515; Data<span style="color:Blue; ><span style="color:Blue; </<span style="color:#A31515; Cell<span style="color:Blue; >) %>
<%= If(t.Rows(r)(13) = "2", <span style="color:Blue; <<span style="color:#A31515; Cell <span style="color:Red; ss:StyleID<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; s56<span style="color:Black; "<span style="color:Blue; ><span style="color:Blue; <<span style="color:#A31515; Data <span style="color:Red; ss:Type<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; Number<span style="color:Black; "<span style="color:Blue; ><%= t.Rows(r)(12) %><span style="color:Blue; </<span style="color:#A31515; Data<span style="color:Blue; ><span style="color:Blue; </<span style="color:#A31515; Cell<span style="color:Blue; >, <span style="color:Blue; <<span style="color:#A31515; Cell <span style="color:Red; ss:StyleID<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; s59<span style="color:Black; "<span style="color:Blue; ><span style="color:Blue; <<span style="color:#A31515; Data <span style="color:Red; ss:Type<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; Number<span style="color:Black; "<span style="color:Blue; ><%= t.Rows(r)(12) %><span style="color:Blue; </<span style="color:#A31515; Data<span style="color:Blue; ><span style="color:Blue; </<span style="color:#A31515; Cell<span style="color:Blue; >) %>
<%= If(t.Rows(r)(13) = "3", <span style="color:Blue; <<span style="color:#A31515; Cell <span style="color:Red; ss:StyleID<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; s66<span style="color:Black; "<span style="color:Blue; ><span style="color:Blue; <<span style="color:#A31515; Data <span style="color:Red; ss:Type<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; Number<span style="color:Black; "<span style="color:Blue; ><%= t.Rows(r)(12) %><span style="color:Blue; </<span style="color:#A31515; Data<span style="color:Blue; ><span style="color:Blue; </<span style="color:#A31515; Cell<span style="color:Blue; >, <span style="color:Blue; <<span style="color:#A31515; Cell <span style="color:Red; ss:StyleID<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; s59<span style="color:Black; "<span style="color:Blue; ><span style="color:Blue; <<span style="color:#A31515; Data <span style="color:Red; ss:Type<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; Number<span style="color:Black; "<span style="color:Blue; ><%= t.Rows(r)(12) %><span style="color:Blue; </<span style="color:#A31515; Data<span style="color:Blue; ><span style="color:Blue; </<span style="color:#A31515; Cell<span style="color:Blue; >) %>
<%= If(t.Rows(r)(13) = "4", <span style="color:Blue; <<span style="color:#A31515; Cell <span style="color:Red; ss:StyleID<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; s67<span style="color:Black; "<span style="color:Blue; ><span style="color:Blue; <<span style="color:#A31515; Data <span style="color:Red; ss:Type<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; Number<span style="color:Black; "<span style="color:Blue; ><%= t.Rows(r)(12) %><span style="color:Blue; </<span style="color:#A31515; Data<span style="color:Blue; ><span style="color:Blue; </<span style="color:#A31515; Cell<span style="color:Blue; >, <span style="color:Blue; <<span style="color:#A31515; Cell <span style="color:Red; ss:StyleID<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; s59<span style="color:Black; "<span style="color:Blue; ><span style="color:Blue; <<span style="color:#A31515; Data <span style="color:Red; ss:Type<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; Number<span style="color:Black; "<span style="color:Blue; ><%= t.Rows(r)(12) %><span style="color:Blue; </<span style="color:#A31515; Data<span style="color:Blue; ><span style="color:Blue; </<span style="color:#A31515; Cell<span style="color:Blue; >) %>
<%= If(t.Rows(r)(15) = "2", <span style="color:Blue; <<span style="color:#A31515; Cell <span style="color:Red; ss:StyleID<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; s56<span style="color:Black; "<span style="color:Blue; ><span style="color:Blue; <<span style="color:#A31515; Data <span style="color:Red; ss:Type<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; Number<span style="color:Black; "<span style="color:Blue; ><%= t.Rows(r)(14) %><span style="color:Blue; </<span style="color:#A31515; Data<span style="color:Blue; ><span style="color:Blue; </<span style="color:#A31515; Cell<span style="color:Blue; >, <span style="color:Blue; <<span style="color:#A31515; Cell <span style="color:Red; ss:StyleID<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; s59<span style="color:Black; "<span style="color:Blue; ><span style="color:Blue; <<span style="color:#A31515; Data <span style="color:Red; ss:Type<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; Number<span style="color:Black; "<span style="color:Blue; ><%= t.Rows(r)(14) %><span style="color:Blue; </<span style="color:#A31515; Data<span style="color:Blue; ><span style="color:Blue; </<span style="color:#A31515; Cell<span style="color:Blue; >) %>
<%= If(t.Rows(r)(15) = "3", <span style="color:Blue; <<span style="color:#A31515; Cell <span style="color:Red; ss:StyleID<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; s66<span style="color:Black; "<span style="color:Blue; ><span style="color:Blue; <<span style="color:#A31515; Data <span style="color:Red; ss:Type<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; Number<span style="color:Black; "<span style="color:Blue; ><%= t.Rows(r)(14) %><span style="color:Blue; </<span style="color:#A31515; Data<span style="color:Blue; ><span style="color:Blue; </<span style="color:#A31515; Cell<span style="color:Blue; >, <span style="color:Blue; <<span style="color:#A31515; Cell <span style="color:Red; ss:StyleID<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; s59<span style="color:Black; "<span style="color:Blue; ><span style="color:Blue; <<span style="color:#A31515; Data <span style="color:Red; ss:Type<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; Number<span style="color:Black; "<span style="color:Blue; ><%= t.Rows(r)(14) %><span style="color:Blue; </<span style="color:#A31515; Data<span style="color:Blue; ><span style="color:Blue; </<span style="color:#A31515; Cell<span style="color:Blue; >) %>
<%= If(t.Rows(r)(15) = "4", <span style="color:Blue; <<span style="color:#A31515; Cell <span style="color:Red; ss:StyleID<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; s67<span style="color:Black; "<span style="color:Blue; ><span style="color:Blue; <<span style="color:#A31515; Data <span style="color:Red; ss:Type<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; Number<span style="color:Black; "<span style="color:Blue; ><%= t.Rows(r)(14) %><span style="color:Blue; </<span style="color:#A31515; Data<span style="color:Blue; ><span style="color:Blue; </<span style="color:#A31515; Cell<span style="color:Blue; >, <span style="color:Blue; <<span style="color:#A31515; Cell <span style="color:Red; ss:StyleID<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; s59<span style="color:Black; "<span style="color:Blue; ><span style="color:Blue; <<span style="color:#A31515; Data <span style="color:Red; ss:Type<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; Number<span style="color:Black; "<span style="color:Blue; ><%= t.Rows(r)(14) %><span style="color:Blue; </<span style="color:#A31515; Data<span style="color:Blue; ><span style="color:Blue; </<span style="color:#A31515; Cell<span style="color:Blue; >) %>
<%= If(t.Rows(r)(17) = "2", <span style="color:Blue; <<span style="color:#A31515; Cell <span style="color:Red; ss:StyleID<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; s56<span style="color:Black; "<span style="color:Blue; ><span style="color:Blue; <<span style="color:#A31515; Data <span style="color:Red; ss:Type<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; Number<span style="color:Black; "<span style="color:Blue; ><%= t.Rows(r)(16) %><span style="color:Blue; </<span style="color:#A31515; Data<span style="color:Blue; ><span style="color:Blue; </<span style="color:#A31515; Cell<span style="color:Blue; >, <span style="color:Blue; <<span style="color:#A31515; Cell <span style="color:Red; ss:StyleID<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; s59<span style="color:Black; "<span style="color:Blue; ><span style="color:Blue; <<span style="color:#A31515; Data <span style="color:Red; ss:Type<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; Number<span style="color:Black; "<span style="color:Blue; ><%= t.Rows(r)(16) %><span style="color:Blue; </<span style="color:#A31515; Data<span style="color:Blue; ><span style="color:Blue; </<span style="color:#A31515; Cell<span style="color:Blue; >) %>
<%= If(t.Rows(r)(17) = "3", <span style="color:Blue; <<span style="color:#A31515; Cell <span style="color:Red; ss:StyleID<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; s66<span style="color:Black; "<span style="color:Blue; ><span style="color:Blue; <<span style="color:#A31515; Data <span style="color:Red; ss:Type<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; Number<span style="color:Black; "<span style="color:Blue; ><%= t.Rows(r)(16) %><span style="color:Blue; </<span style="color:#A31515; Data<span style="color:Blue; ><span style="color:Blue; </<span style="color:#A31515; Cell<span style="color:Blue; >, <span style="color:Blue; <<span style="color:#A31515; Cell <span style="color:Red; ss:StyleID<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; s59<span style="color:Black; "<span style="color:Blue; ><span style="color:Blue; <<span style="color:#A31515; Data <span style="color:Red; ss:Type<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; Number<span style="color:Black; "<span style="color:Blue; ><%= t.Rows(r)(16) %><span style="color:Blue; </<span style="color:#A31515; Data<span style="color:Blue; ><span style="color:Blue; </<span style="color:#A31515; Cell<span style="color:Blue; >) %>
<%= If(t.Rows(r)(17) = "4", <span style="color:Blue; <<span style="color:#A31515; Cell <span style="color:Red; ss:StyleID<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; s67<span style="color:Black; "<span style="color:Blue; ><span style="color:Blue; <<span style="color:#A31515; Data <span style="color:Red; ss:Type<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; Number<span style="color:Black; "<span style="color:Blue; ><%= t.Rows(r)(16) %><span style="color:Blue; </<span style="color:#A31515; Data<span style="color:Blue; ><span style="color:Blue; </<span style="color:#A31515; Cell<span style="color:Blue; >, <span style="color:Blue; <<span style="color:#A31515; Cell <span style="color:Red; ss:StyleID<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; s59<span style="color:Black; "<span style="color:Blue; ><span style="color:Blue; <<span style="color:#A31515; Data <span style="color:Red; ss:Type<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; Number<span style="color:Black; "<span style="color:Blue; ><%= t.Rows(r)(16) %><span style="color:Blue; </<span style="color:#A31515; Data<span style="color:Blue; ><span style="color:Blue; </<span style="color:#A31515; Cell<span style="color:Blue; >) %>
<span style="color:Blue; </<span style="color:#A31515; Row<span style="color:Blue; > %>
<span style="color:Blue; </<span style="color:#A31515; Table<span style="color:Blue; >
<span style="color:Blue; </<span style="color:#A31515; Worksheet<span style="color:Blue; > %>
<span style="color:Blue; <<span style="color:#A31515; WorksheetOptions <span style="color:Red; xmlns<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; urn:schemas-microsoft-comffice:excel<span style="color:Black; "<span style="color:Blue; >
<span style="color:Blue; <<span style="color:#A31515; Selected<span style="color:Blue; />
<span style="color:Blue; <<span style="color:#A31515; FreezePanes<span style="color:Blue; />
<span style="color:Blue; <<span style="color:#A31515; FrozenNoSplit<span style="color:Blue; />
<span style="color:Blue; <<span style="color:#A31515; SplitHorizontal<span style="color:Blue; >1<span style="color:Blue; </<span style="color:#A31515; SplitHorizontal<span style="color:Blue; >
<span style="color:Blue; <<span style="color:#A31515; TopRowBottomPane<span style="color:Blue; >1<span style="color:Blue; </<span style="color:#A31515; TopRowBottomPane<span style="color:Blue; >
<span style="color:Blue; <<span style="color:#A31515; PageSetup<span style="color:Blue; >
<span style="color:Blue; <<span style="color:#A31515; Header <span style="color:Red; x:Margin<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; 0.3<span style="color:Black; "<span style="color:Blue; />
<span style="color:Blue; <<span style="color:#A31515; Footer <span style="color:Red; x:Margin<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; 0.3<span style="color:Black; "<span style="color:Blue; />
<span style="color:Blue; <<span style="color:#A31515; PageMargins <span style="color:Red; x:Bottom<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; 0.75<span style="color:Black; " <span style="color:Red; x:Left<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; 0.7<span style="color:Black; " <span style="color:Red; x:Right<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; 0.7<span style="color:Black; " <span style="color:Red; x:Top<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; 0.75<span style="color:Black; "<span style="color:Blue; />
<span style="color:Blue; </<span style="color:#A31515; PageSetup<span style="color:Blue; >
<span style="color:Blue; <<span style="color:#A31515; Print<span style="color:Blue; >
<span style="color:Blue; <<span style="color:#A31515; ValidPrinterInfo<span style="color:Blue; />
<span style="color:Blue; <<span style="color:#A31515; HorizontalResolution<span style="color:Blue; >300<span style="color:Blue; </<span style="color:#A31515; HorizontalResolution<span style="color:Blue; >
<span style="color:Blue; <<span style="color:#A31515; VerticalResolution<span style="color:Blue; >300<span style="color:Blue; </<span style="color:#A31515; VerticalResolution<span style="color:Blue; >
<span style="color:Blue; </<span style="color:#A31515; Print<span style="color:Blue; >
<span style="color:Blue; <<span style="color:#A31515; Panes<span style="color:Blue; >
<span style="color:Blue; <<span style="color:#A31515; Pane<span style="color:Blue; >
<span style="color:Blue; <<span style="color:#A31515; Number<span style="color:Blue; >3<span style="color:Blue; </<span style="color:#A31515; Number<span style="color:Blue; >
<span style="color:Blue; <<span style="color:#A31515; ActiveCol<span style="color:Blue; >2<span style="color:Blue; </<span style="color:#A31515; ActiveCol<span style="color:Blue; >
<span style="color:Blue; </<span style="color:#A31515; Pane<span style="color:Blue; >
<span style="color:Blue; </<span style="color:#A31515; Panes<span style="color:Blue; >
<span style="color:Blue; <<span style="color:#A31515; ProtectObjects<span style="color:Blue; >False<span style="color:Blue; </<span style="color:#A31515; ProtectObjects<span style="color:Blue; >
<span style="color:Blue; <<span style="color:#A31515; ProtectScenarios<span style="color:Blue; >False<span style="color:Blue; </<span style="color:#A31515; ProtectScenarios<span style="color:Blue; >
<span style="color:Blue; </<span style="color:#A31515; WorksheetOptions<span style="color:Blue; >
<span style="color:Blue; </<span style="color:#A31515; Workbook<span style="color:Blue; >
Return sheet
[/code]
View the full article