简体   繁体   中英

microsoft xml excel - row formatting

I am using Microsoft XML Excel with ColdFusion to display my query results on Excel sheet. I am using multiple worksheets. I see there is a border style property available. is there a way I can set background color for rows and other styles. I don't see good documentation on how to do all these.

Thanks

See XML in Excel and the Spreadsheet Component for the full documentation. But it often helps to just create a spreadsheet, save it as *.xml and review the output. Example:

... 
<Styles>
  <Style ss:ID="s23">
   <Interior ss:Color="#800080" ss:Pattern="Solid"/>
  </Style>
  <Style ss:ID="s24">
   <Interior ss:Color="#0000FF" ss:Pattern="Solid"/>
  </Style>
 </Styles>
 <Worksheet ss:Name="Sheet1">
  <Table ss:ExpandedColumnCount="1" ss:ExpandedRowCount="3" x:FullColumns="1"
   x:FullRows="1">
   <Row>
    <Cell ss:StyleID="s23"><Data ss:Type="String">apple</Data></Cell>
   </Row>
   <Row>
    <Cell ss:StyleID="s24"><Data ss:Type="String">orange</Data></Cell>
   </Row>
  </Table>
 </Worksheet>
  ...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM