XSL Excel Row Height / Formatting Rows vs Columns/Cells

Posted on 2007-07-20
Last Modified: 2013-11-18
How can set the "Height" of the FIRST row in an excel sheet, utilizing a xsl file and .NET Transform from a dataset?

I can set the "First Row of CELLS" to any 'Style' in a foreach but I need to have the first row set to a height of 50!
Question by:William
    LVL 12

    Accepted Solution

    In the Row element, set attribute ss:Height="50"
    where  xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" is declared in the Workbook node.

    You can do that in the xsl, by using something like
    <xsl:if test="position() = 1">
      <xsl:attribute name="ss:Height">50</xsl:attribute>
    LVL 11

    Author Comment

    Thanks !! That did the job!

    I only have one other question

    Where can you read/learn all this xsl syntax for excel?
    Can you recommend any book(s)?
    LVL 12

    Expert Comment

    The xml syntax for excel I learn simply by creating an excel spreadsheet in Excel 2003, with my desired result, eg for yours I changed row height and type in some data into the row.  I then exported the excel sheet to xml using Excel.

    For xsl, W3Schools has a good beginners tutorial.

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Join & Write a Comment

    Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
    Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
    Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
    Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now