Eduardo
Eduardo

Reputation: 8402

Freeze Panes in HTML opened in Excel

My application exports data to Excel as HTML.

It saves the markup of an HTML table in a temporary file (using xls as an extension). It then asks the operating system to open that file using its native application.

Excel can open it without a problem. I have even been able to get some formatting via CSS.

I would like the top x rows not to scroll. I was wondering if there was a way of achieving a "freeze panes" effect? I have tried using the thead and tbody tags but it does not help.

I am programming this in ActionScript. However the language used to generate the markup in the text file is irrelevant. What is important is the markup itself.

Upvotes: 1

Views: 2513

Answers (1)

xmojmr
xmojmr

Reputation: 8145

I haven't tried that myself but this http://jwcooney.com/2011/09/08/generating-excel-documents-through-html-xml-and-css-part-2/ page seems to have an answer

..The x:FreezePanes and x:Panes markup in green below tells Excel to Freeze the first row of the document..

x:FreezePanes etc. elements are documented in the "Microsoft Office HTML and XML Reference" which you can download at http://msdn.microsoft.com/en-us/library/Aa155477%28office.10%29.aspx

The x:urn:schemas-microsoft-com:office:excel namespace is also known as "XML Spreadsheet 2000"

Upvotes: 1

Related Questions