This visualforce page renders a csv but all the data is on one row. Where did I go wrong, how do I get a new row after every apex:repeat?
Note: The code below is on one line to prevent empty header rows when rendering.
<apex:page standardController="Custom_Object__c" cache="true" contentType="text/csv#filename.csv" language="en-US"> Col A","Col B","Col C","Col D","Col E",<apex:repeat value="{!Custom_Object__c.Custom_Object_Members__r}" var="co"> {!co.Custom_Object__c.Name},{!co.Contact__r.FirstName},{!co.Contact__r.LastName},{!co.Contact__r.Email},{!co.Contact__r.MobilePhone}, </apex:repeat>
This code all goes on line:
<apex:page standardController="Custom_Object__c" cache="true" contentType="text/csv#filename.csv" language="en-US"> Col A","Col B","Col C","Col D","Col E",
<apex:repeat value="{!Custom_Object__c.Custom_Object_Members__r}" var="co"> {!co.Custom_Object__c.Name},{!co.Contact__r.FirstName},{!co.Contact__r.LastName},{!co.Contact__r.Email},{!co.Contact__r.MobilePhone},
</apex:repeat></apex:page>
This code puts line break where needed (it seems a new line with anything in it adds a new row, "_" in this example.)
<apex:page standardController="Custom_Object__c" cache="true" contentType="text/csv#filename.csv" language="en-US"> Col A","Col B","Col C","Col D","Col E",
_
<apex:repeat value="{!Custom_Object__c.Custom_Object_Members__r}" var="co"> {!co.Custom_Object__c.Name},{!co.Contact__r.FirstName},{!co.Contact__r.LastName},{!co.Contact__r.Email},{!co.Contact__r.MobilePhone},
_
</apex:repeat></apex:page>
This example also gives line breaks.
<apex:page standardController="Custom_Object__c" cache="true" contentType="text/csv#filename.csv" language="en-US"> Col A","Col B","Col C","Col D","Col E",
_<apex:repeat value="{!Custom_Object__c.Custom_Object_Members__r}" var="co"> {!co.Custom_Object__c.Name},{!co.Contact__r.FirstName},{!co.Contact__r.LastName},{!co.Contact__r.Email},{!co.Contact__r.MobilePhone},
_</apex:repeat></apex:page>
For whatever reason, I need to have text before a return, the visualforce tags themselves do not trigger a new line....what the waffle....