Excel template done in HTML for export: how to make it Landscape?

Amegi18

New Member
Joined
Mar 18, 2013
Messages
9
Hi, I am tasked to export a data table done in visualforce (using apex), into an excel file.

I can already export the data into an excel file. The display is also ok when exported to excel.
My problem is that, I do not know how to code in HTML, in such a way that the exported excel file will
automatically be in landscape format.

I have an idea from other forums but it doesn't work.
Please help ... m(_ _)m

Here is a part of the code handling the page orientation (but it does not work):

Code:
<apex:page standardController="NDOC_LIST__c" extensions="NDOC_LIST_Ext" contentType="application/vnd.ms-excel#DocStat.xls" recordSetVar="ndocs" sidebar="false">
<style type="text/css">
@page
  { 
    mso-header-data:"DOCUMENT STATUS LIST";
    margin:.91in .39in .55in .39in;
    mso-header-margin:.79in;
    mso-footer-margin:.39in;
[B]    mso-page-orientation:landscape;[/B]
  }
...
* the code is so far purely apex and html only..
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.

Forum statistics

Threads
1,223,236
Messages
6,170,917
Members
452,366
Latest member
TePunaBloke

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top