Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7878835
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T03:46:14+00:00 2026-06-03T03:46:14+00:00

We are using HTML/XML/CSS to export a table to excel 2007. I have the

  • 0

We are using HTML/XML/CSS to export a table to excel 2007.

I have the below code setup, which when the HTML page loads, it then exports the data to Excel. The first two rows are set as frozen panes, which is great while viewing the document, but does not print those rows on every printed page. All of my page data is in table tr-th tr-td format.

the block towads the bottom (i have read) is supposed to make the first row print on every printed page… but it is not.

I have also read that the …. section, should print the first rows on every page, but this does not seem to work either.

Any suggestions, ideas or answers are appreciated!!

    header("Cache-Control: public, must-revalidate");
    header("Pragma: no-cache");
    header ('Content-type: application/vnd.ms-excel');
    header ('Content-Disposition: attachment; filename=StoreVsCompany.xls');

    echo '
    <html xmlns:x="urn:schemas-microsoft-com:office:excel">
    <head>            
        <!--[if gte mso 9]>
        <xml>
            <x:ExcelWorkbook>
                <x:ExcelWorksheets>
                    <x:ExcelWorksheet>
                        <x:Name>VendorAgendaSummary</x:Name>
                        <x:WorksheetOptions>
                            <x:PageSetup>         
                                <x:Layout x:Orientation="Portrait"/>         
                                <x:Header x:Margin="0.3"/>         
                                <x:Footer x:Margin="0.3"/>         
                                <x:PageMargins x:Bottom="0.75" x:Left="0.5" x:Right="0.5" x:Top="0.75"/>        
                            </x:PageSetup>        
                            <x:FitToPage/>  
                            <x:Print>         
                                <x:FitHeight>100</x:FitHeight>         
                                <x:ValidPrinterInfo/>         
                                <x:HorizontalResolution>600</x:HorizontalResolution>         
                                <x:VerticalResolution>600</x:VerticalResolution>        
                            </x:Print>
                            <x:FreezePanes/>
                            <x:FrozenNoSplit/>
                            <x:SplitHorizontal>2</x:SplitHorizontal>
                            <x:TopRowBottomPane>2</x:TopRowBottomPane>
                            <x:SplitVertical>2</x:SplitVertical>
                            <x:LeftColumnRightPane>2</x:LeftColumnRightPane>
                            <x:ActivePane>0</x:ActivePane>
                            <x:Panes>
                                <x:Pane>
                                   <x:Number>3</x:Number>
                                </x:Pane>
                                <x:Pane>
                                   <x:Number>1</x:Number>
                                </x:Pane>
                                <x:Pane>
                                   <x:Number>2</x:Number>
                                </x:Pane>
                                <x:Pane>
                                   <x:Number>0</x:Number>
                                <x:ActiveRow>0</x:ActiveRow>
                                <x:ActiveCol>1</x:ActiveCol>
                                </x:Pane>
                            </x:Panes>
                        </x:WorksheetOptions>
                    </x:ExcelWorksheet>
                </x:ExcelWorksheets>
            </x:ExcelWorkbook>
            <x:ExcelName> 
                <x:Name>Print_Titles</x:Name> 
                <x:SheetIndex>1</x:SheetIndex> 
                <x:Formula>=\'strWorkBookName\'!$1:$1</x:Formula> 
            </x:ExcelName>
        </xml>
        <![endif]-->
    </head>';   
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T03:46:15+00:00Added an answer on June 3, 2026 at 3:46 am

    using a combination of this, i was able to freeze row 6.

    <x:ExcelWorkbook>               
       <x:ExcelWorksheets>
          <x:ExcelWorksheet>
             <x:WorksheetOptions>
                <x:FreezePanes/>
                <x:FrozenNoSplit/>
                <x:SplitHorizontal>6</x:SplitHorizontal>
                <x:TopRowBottomPane>6</x:TopRowBottomPane>
                <x:ActivePane>2</x:ActivePane>
             </x:WorksheetOptions>
          </x:ExcelWorksheet>
       </x:ExcelWorksheets>
    </x:ExcelWorkbook>
    
    <x:ExcelName> 
       <x:Name>Print_Titles</x:Name> 
       <x:SheetIndex>1</x:SheetIndex> 
       <x:Formula>=Sheet1!$6:$6</x:Formula>
    </x:ExcelName>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a single xml document (data.xml), which I display as HTML using an
I am using MSXML3 and have loaded an xml document which is a HTML
Using CSS Style Sheet, HTML, XML When i run my website, my page was
I have an XML data source that has HTML & CSS formatted data contained
I have experience developing web applications using Java, HTML, JS, and CSS. At this
I am taking an XML feed and writing it to HTML using JavaScript. The
I am writing a XML file into a HTML file using JavaScript. Here is
What advantages are there for using either XSLT or Linq to XML for HTML
I am using Linq to XML for some HTML output files. I need to
I am using the (.NET 3.5 SP1) System.Xml.Linq namespace to populate an html template

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.