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):
* the code is so far purely apex and html only..
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]
}
...