Results 1 to 5 of 5

Thread: How to keep freeze pane in HTML from Excel?

  1. #1
    Join Date
    Aug 2006
    Posts
    253

    How to keep freeze pane in HTML from Excel?

    I want to save an Excel file as HTML. The main thing is that I want to keep the selected freeze pane of Excel in HTML form. Is it possible.?? I don't know much because I am the beginner. Is there any software that can perform this task..?? I am having several tab sheet which should be kept in final HTML. So if anybody knows the solution please provide me..!!

  2. #2
    Join Date
    Jul 2006
    Posts
    289

    Re: How to keep freeze pane in HTML from Excel?

    I think that you can use the CSS overflow Property. I am providing you an example of that :
    Code:
    div
    {
    width:150px;
    height:150px;
    overflow:scroll;
    }
    The overflow property specifies what happens if content overflows an element's box.
    Signatures reduce available bandwidth

  3. #3
    Join Date
    Nov 2008
    Posts
    996

    Re: How to keep freeze pane in HTML from Excel?

    The script that is described below will simply hides/unhides columns or rows using scrolling buttons, creating an Excel-like effect. Hope that this effect will help you. Here is the code for that :
    Code:
    <button title="Up" onmousedown="upp();" onmouseup="upp(1);">Up</button>
    <button title="Left" onmousedown="left();" 
            onmouseup="left(1);">&lt;&lt;</button>
    <button title="Right" onmousedown="right();" 
            onmouseup="right(1);">&gt;&gt;</button>
    <button title="Down" onmousedown="down();" onmouseup="down(1);">Dn</button>
    You can also use the images for a more attractive display.

  4. #4
    Join Date
    Mar 2008
    Posts
    349

    Re: How to keep freeze pane in HTML from Excel?

    I am trying to provide you the code of Freeze Panes Demo. Hope that you will get some help from this coding.
    Code:
    var myRow=1;
      var myCol=1;
      var noRows;
      var myTable;
      var myCells,ID;
      
    function setUp(){
        if(!myTable){myTable=document.getElementById("t1");}
         myCells = myTable.rows[0].cells.length;
        noRows=myTable.rows.length;
    
        for( var x = 0; x < myTable.rows[0].cells.length; x++ ) {
            colWdth=myTable.rows[0].cells[x].offsetWidth;
            myTable.rows[0].cells[x].setAttribute("width",colWdth-4);
    
        } 
    }
    
    function right(up){
        if(up){window.clearTimeout(ID);return;}
        if(!myTable){setUp();}
    
        if(myCol<(myCells)){
            for( var x = 0; x < noRows; x++ ) {
                myTable.rows[x].cells[myCol].style.display="";
            }
            if(myCol >1){myCol--;}
    
            ID = window.setTimeout('right()',100);
        }
    }
      
    function left(up){
        if(up){window.clearTimeout(ID);return;}
        if(!myTable){setUp();}
    
        if(myCol<(myCells-1)){
            for( var x = 0; x < noRows; x++ ) {
                myTable.rows[x].cells[myCol].style.display="none";
            }
            myCol++
            ID = window.setTimeout('left()',100);
            
        }
    }
      
    function down(up){
        if(up){window.clearTimeout(ID);return;}
        if(!myTable){setUp();}
    
        if(myRow<(noRows-1)){
                myTable.rows[myRow].style.display="none";
                myRow++    ;
            
                ID = window.setTimeout('down()',100);
        }    
    }
     
    function upp(up){
        if(up){window.clearTimeout(ID);return;}
        if(!myTable){setUp();}
    
        if(myRow<=noRows){
            myTable.rows[myRow].style.display="";
            if(myRow >1){myRow--;}
            ID = window.setTimeout('upp()',100);
        }    
    }

  5. #5
    Join Date
    Nov 2008
    Posts
    1,192

    Re: How to keep freeze pane in HTML from Excel?

    It is also possible to open a file named "XLS" in Excel that is stored in HTML. This can be useful for web applications that want to export data easily into a spreadsheet. The following coding will output the spreadsheet as almost plain HTML. Also the following code uses the Freeze Panes feature to freeze header rows and columns. So here is the code for that :
    Code:
    <html xmlns:o="urn:schemas-microsoft-com:office:office"
    xmlns:x="urn:schemas-microsoft-com:office:excel"
    xmlns="http://www.w3.org/TR/REC-html40">
     
    <head>
    <meta http-equiv=Content-Type content="text/html; charset=windows-1252">
    <meta name=ProgId content=Excel.Sheet>
    <meta name=Generator content="Microsoft Excel 11">
     
    <!--[if gte mso 9]>
    <xml>
     <x:ExcelWorkbook>
      <x:ExcelWorksheets>
       <x:ExcelWorksheet>
        <x:Name>** WORKSHEET NAME **</x:Name>
        <x:WorksheetOptions>
         <x:Selected/>
         <x:FreezePanes/>
         <x:FrozenNoSplit/>
         <x:SplitHorizontal>** FROZEN ROWS + 1 **</x:SplitHorizontal>
         <x:TopRowBottomPane>** FROZEN ROWS + 1 **</x:TopRowBottomPane>
         <x:SplitVertical>** FROZEN COLUMNS + 1 **</x:SplitVertical>
         <x:LeftColumnRightPane>** FROZEN COLUMNS + 1**</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:Pane>
         </x:Panes>
         <x:ProtectContents>False</x:ProtectContents>
         <x:ProtectObjects>False</x:ProtectObjects>
         <x:ProtectScenarios>False</x:ProtectScenarios>
        </x:WorksheetOptions>
       </x:ExcelWorksheet>
      </x:ExcelWorksheets>
      <x:ProtectStructure>False</x:ProtectStructure>
      <x:ProtectWindows>False</x:ProtectWindows>
     </x:ExcelWorkbook>
    </xml><![endif]-->
     
    </head>
    <body>
     
    <table>
     
    <thead>
       ** TABLE HEADER ROWS GO HERE **
       <tr>
          <th>Header Cell</th>
          ...
       </tr>
    </thead>
     
    <tbody>
       ** TABLE DATA ROWS GO HERE **
       <tr>
          <td>Data Cell</td>
          ...
       </tr>
    </tbody>
     
    </table>
     
    </body>
    </html>
    Before using this skeleton code, you will have to create a new file with the ".XLS" extension

Similar Threads

  1. How to remove HTML tags from Excel Sheet
    By Jaques Strapp in forum MS Office Support
    Replies: 3
    Last Post: 25-01-2012, 07:50 PM
  2. Task pane disappears when you start Excel
    By The Recruiter in forum Windows Software
    Replies: 5
    Last Post: 11-03-2010, 12:59 AM
  3. Create html table from excel file
    By Laler in forum Windows Software
    Replies: 3
    Last Post: 26-06-2009, 08:44 AM
  4. How do i transfer html form data to excel
    By softte in forum Software Development
    Replies: 2
    Last Post: 16-05-2009, 02:48 PM
  5. Data freeze in excel
    By DEHATEH in forum Windows Software
    Replies: 3
    Last Post: 23-04-2009, 10:30 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,295,235.74342 seconds with 17 queries