Generate file .csv

Hi

As I can generate a fichero csv from the developer?

thanks

use the WmFlatFile package. See 7-1-1_Flat_File_Schema_Developers_Guide.pdf

you can send an example to create a file using WMFLATfile
I’ve tried and I do not do well

thanks

[list]

  1. Create a Flat File Dictionary

[list=1:c46cfa0908]
a. Enter record and field definitions as needed.
b. For CSV,

  1. o I prefer to use “Nth position”.
    o Allow for the Record Identifier (see the Schema). I put this in 0, so data fields begin in position 1

c. Save the Dictionary[/list:o:c46cfa0908]
2. Create a Flat File Schema

[list]
a. Add a record reference to the record definition in the Dictionary from the Flat File Structure tab
b. Fill in the Flat File Definition tab. For CSV, use “Delimiter” and fill in the delimiter options, such as:

  1. o Record Delimiter - carriage return and line feed
    o Field or Composite - comma
    o Subfield - comma
    o Quoted Release - double quote "
    o Release - double quote "
    o Record Identifier - Nth Field - 0.

c. Save the Schema
d. Create a document (click on the document icon from the Flat File Structure tab)[/list:o:c46cfa0908]
3. Create a flow to populate the document

  • a. Map output data to the document
    b. Use pub.flatFile:convertToString to create the CSV string
    [list]
    o Copy the FlatFile Schema name to the ffSchema input
    [/list]

    c. Use PSUtilities.file:writeToFile to output the CSV string to a file

[/list:o:c46cfa0908]
TechForum_FlatFile.zip (10.4 KB)

2 Likes

PSUtilities.file:writeToFile - Please attach this service package

When you are on wM 9.5 and above, you can use the built-in service pub.file:writeToFile instead.

Rembember to adjust WmPublic/config/fileAccessControl.cnf accordingly and reload WmPublic package afterwards.

See IS Built-In-Services Reference for further informations.

Regards,
Holger

Dear Holger von Thomsen,

I am using WM version10.5. But I have not found the built-in service pub.file:writeToFile. Though I have fund the built-in service pub.file:stringToFile which is not satisfying my requirement. Can you please provide me pub.file:writeToFile service.

Hi,

I would suggest to open a new topic where you describe your requirement in detail.
We can check then if there are other *ToFile Services which meet your requirement better or how do modify your logic to make stringToFile a match.

Regards,
Holger

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.