Exporting Data
Hi, I am trying to export data into excel using .csv. it seems to run ok but it isnt appearing as it should. Part of the numbers are taken from one column and put at the end of the other as pictures show.
To be honest, I'm more impressed that some of the numbers end up in a separate column...
What is your field separator?
From when we can see you basically send it all as one string.
Calling fields 1,2,3,4 etc. is not advisable either.
hi,
for csv files, normally if you choose " as text delimiter solves the issue.
kind regards
Josef
tbh, I have called the fioelds different names to try and solve the problem.
Where would I insert " as text delimiter in the DQL?
Where would I put a field separator in DQL
Tab is normally the most convenient field separator, unless you wat to use any comma (,) or any other character.
Create a variable to hold the 'Tab' value
define "tTab" Text .
tTab := " " . (make sure there is a tab between the quotes)
tTab can be listed and referred to in the export like any field
Put tTab in the export between each field required to be in a new column (not at the beginning or end of line) .
Download export.csv
Excel will import directly if you have "around" the values and , (comma) as separator.
WHat you do with the .export is to create a text file so you can format it as you please.
.items
etc
"1 VAT Due in this period on sales","@f[1,3]"
"2 VAT Due in this period on EC acquisitions","@f[1,4]"
etc
.end
You can do any other formatting you please to.
<html>
<table>
<tr>
<td>1 VAT due on in this period on sales</td><td>@f[1,3]</td>
</tr>
</table>
</html>
Try to download the above file and open it in Excel. You will see it formats correctly immediately.