Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Generate a CSV file without the headers

Status
Not open for further replies.

BBO007

Programmer
Jun 11, 2009
18
GB
Hello everyone,

I am using PB 11.2.
I have a grid datawindow. I would like to generate a CSV file from the dw.
With ';' as separator for columns but without the heading of the columns.

I know that the SaveAs enables me not to have the headings, but I cannot choose the separator.
On the other hand, the SaveAsFormattedText (or SaveAsAscii) lets me choose the separator, but then I have the columns headings.

Do you have any idea to help me to find a solution?

Thank you in advance of your assistance
Thorben
 
Save the file using SaveAsAscii. Then open the file using FileOpen with the filemode parameter LineMode! (the default). Use a loop (something like DO WHILE FileReadEx(filenumber, ls_line) > 0)
then write all but the first line to another file.

Matt

"Nature forges everything on the anvil of time"
 
Thanks Matt,

This is exactly what I have finally done, and it is working fine.
It is so fast that the user does not see that process.

Thank you for your answer !!!

Thorben
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top