Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 4 > ASP.NET 4 General Discussion
|
ASP.NET 4 General Discussion For ASP.NET 4 discussions not relating to a specific Wrox book
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 4 General Discussion section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 31st, 2013, 05:56 AM
Registered User
 
Join Date: Jan 2013
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Can anybody help me in modification of xls stylesheet to merge two cells of a row

I have built a simple style sheet coded as follows:
Code:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"><xsl:template match="/">
  <HTML>
    <HEAD>
      <STYLE type="text/css">
        TABLE{table-layout: automatic; width:100%} .tblHeader{background-color:RGB(192,192,192);font-weight:bold} 
      </STYLE>
    </HEAD>
    <BODY>
      <TABLE border="1">
        <THEAD><TR class="tblHeader">
          <TD colspan="16" align="center">
            LA MARTINIERE GIRLS' COLLEGE, LUCKNOW
          </TD>
          <!-- <TD>F2</TD>
          <TD>F3</TD>
          <TD>F4</TD>
          <TD>F5</TD>
          <TD>F6</TD>
          <TD>F7</TD>
          <TD>F8</TD>
          <TD>F9</TD>
          <TD>F10</TD>
          <TD>F11</TD>
          <TD>F12</TD>
          <TD>F13</TD>
          <TD>F14</TD>
          <TD>F15</TD>
          <TD>F16</TD>-->
        </TR>
        </THEAD>
        <TBODY>
          <xsl:for-each select="NewDataSet/Table1">
            <TR><xsl:choose> 
              <xsl:when test="position() mod 2 = 1"> 
                <xsl:attribute name="class">row1</xsl:attribute> 
              </xsl:when>
              <xsl:otherwise>
                <xsl:attribute name="class">row2</xsl:attribute> 
              </xsl:otherwise> </xsl:choose>
              <TD><xsl:value-of select="F1"/></TD>
              <TD><xsl:value-of select="F2"/></TD>
              <TD><xsl:value-of select="F3"/></TD>
              <TD><xsl:value-of select="F4"/></TD>
              <TD><xsl:value-of select="F5"/></TD>
              <TD><xsl:value-of select="F6"/></TD>
              <TD><xsl:value-of select="F7"/></TD>
              <TD><xsl:value-of select="F8"/></TD>
              <TD><xsl:value-of select="F9"/></TD>
              <TD><xsl:value-of select="F10"/></TD>
              <TD><xsl:value-of select="F11"/></TD>
              <TD><xsl:value-of select="F12"/></TD>
              <TD><xsl:value-of select="F13"/></TD>
              <TD><xsl:value-of select="F14"/></TD>
              <TD><xsl:value-of select="F15"/></TD>
              <TD><xsl:value-of select="F16"/></TD>
            </TR></xsl:for-each>
        </TBODY>
      </TABLE>
    </BODY>
  </HTML>
</xsl:template></xsl:stylesheet>
This style sheet is used to provide styling to an excel sheet. Please help me to modify the sheet in such a way that I can get an excel sheet having some cells merged eg if there are 15 columns then for a particular row 4 I want col1, col2, col3 to be merged and highlighted by a color and for another Rows, they should not be merged.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Merge cells and WrapText together Softnut Excel VBA 2 December 13th, 2007 12:27 AM
Merge Cells in Grid tiyyob .NET Framework 2.0 1 August 1st, 2006 04:42 AM
How to merge a set of cells? Jell Excel VBA 3 August 9th, 2005 01:15 AM
Merge and Split Cells in Matrix johnnychow.hike BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 0 October 25th, 2004 10:17 PM
Merge Cells in MshFlexgrid malavshah11 VB How-To 0 February 11th, 2004 07:03 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.