Complex CSV export
David Thompson
dthmpsn1 at illinois.edu
Sun Jul 20 11:05:25 PDT 2008
>My shopping cart is designed to interface with QuickBooks, but I am
>a die-hard Panorama user (since OverVue). I need to export a
>complex CSV file to import into my shopping cart. The file format
>has several sections, each with header info on multiple lines, and
>then data, sometimes combining info from several records onto a
>single line.
>
>My understanding of the export wizard is somewhat limited (I am an
>old-school forms kinda guy), but the multiple-line headers, and
>combining data from a non-fixed number of records onto a single line
>both seem incompatible with this route. Generally, I would prefer
>to solve this using scripts and forms.
I don't think the export wizard would be any help at all in this situation.
>
>I can produce the CSV lines readily using multiple forms, but am
>unable to output them into a single file with appropriate header
>info before each section.
>
>1) Is there any way to append to a single text file when I use save as text?
No, but once the separate files have been saved, they can be loaded
into variables using the fileload( function, their contents and the
header data concatenated, and then saved as a new file with the
FileSave command.
>
>2) How can I write multiple lines of header info to a text file (the
>text from a header tile is ignored when I save as text)?
When you are using a form and SaveAsText, the form can contain up to
7 group header tiles, one for each summary level, and it can also
contain up to 7 summary tiles. If the database has been grouped, a
group header tile with the same or greater level as the grand total
summary record can be used as a header tile for the file as a whole.
Even if the database hasn't been grouped, you can use a group header
tile for that purpose. In that case, its level could be as low as 1.
Multiple lines will be produced if the formula in the group header is
generating text with carriage returns in it.
Barry Kahn has already covered anything else I can think to say.
Dave
More information about the Qna
mailing list