You need to sign in to do that
Don't have an account?

How to print Values in next row , while downloading as a Textfile
File is getting dowload..!
1)Need to print the records in the Row by Row..as ALL RECOREDS is printing in a single row..
ANY SUGGESTIONS TO PRINT IN THE NEXT ROW WITH THE TABELIMINATED FORMAT..
THANKS,
dEEPIKA
1)Need to print the records in the Row by Row..as ALL RECOREDS is printing in a single row..
public class TesttabEliminated{ public list<account> lstaccount{get;set;} public TesttabEliminated(){ lstaccount = new list<account>(); lstaccount =[select id, name from account limit 5]; } }V.F:
<apex:page controller="TesttabEliminated" contentType="text/plain/#test.txt"> <apex:repeat value="{!lstaccount}" var="a"> {!a.id} {!a.name} </apex:repeat> </apex:page>
ANY SUGGESTIONS TO PRINT IN THE NEXT ROW WITH THE TABELIMINATED FORMAT..
THANKS,
dEEPIKA
Use contentType="application/vnd.ms-excel#AllContacts.xls" and use PageBlocktable to get organized data.
I'm just posting a sample code you can try:
VF:
Controller:
public class Content_Example {
public list<account> lstaccount {get;set;}
public Content_Example(){
lstaccount = [select id, name from account limit 5];
}
}
Thanks,
Ashish Singh.