# How do I use XmlToDatabase to export web form data to a text file as comma separated values (CSV)?

**URL:** <https://discuss.workflowgen.com/t/how-do-i-use-xmltodatabase-to-export-web-form-data-to-a-text-file-as-comma-separated-values-csv/459>\
**Category:** Workflow Applications\
**Created:** [January 7, 2008, 5:29am UTC](https://discuss.workflowgen.com/t/how-do-i-use-xmltodatabase-to-export-web-form-data-to-a-text-file-as-comma-separated-values-csv/459 "2008-01-07T05:29:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![wfg-admin](https://yyz2.discourse-cdn.com/flex030/user_avatar/discuss.workflowgen.com/wfg-admin/32/714_2.png) [@wfg-admin](https://discuss.workflowgen.com/u/wfg-admin)\
**Post date:** [January 7, 2008, 5:29am UTC](https://discuss.workflowgen.com/t/how-do-i-use-xmltodatabase-to-export-web-form-data-to-a-text-file-as-comma-separated-values-csv/459/1 "2008-01-07T05:29:36Z")

</div>

Here is the example of the `transactions.xml` file used (located in `[DRIVE]:\Inetpub\wwwroot\wfgen\WfApps\WebServices\xmlToDatabase\App_Data`):

```xml
<transaction name="EXPORT2TEXT">
    <databases>
        <database name="EXPORT2TEXT" connectionstring="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Export2Text\;Extended Properties='text;HDR=No;FMT=Delimited';" provider="System.Data.OleDb">
            <command type="INSERT" loop="NO" xpath="/NewDataSet/Table1/">INSERT INTO [CBRE_EXPORT2TEXT]  
             (  
             [Field1]  
             ,[Field2]  
             ,[Field3]  
             ,[Field4]  
             )  
             VALUES  
             (  
             '{PARAM:MyParamAsText1}'  
             ,{PARAM:MyParamAsNumeric2}  
             ,3  
             ,'{PARAM:MyDateTimeAsMacro1}'  
             )
            </command>
        </database>
    </databases>
</transaction>

```

You will require a `schema.ini` file within the `C:\Export2Text\` folder.

```auto
[EXPORT2TEXT.txt]   
Format=Delimited(,)   
CharacterSet=ANSI   
ColNameHeader=False   
Col1=Field1 Char   
Col2=Field2 Integer Width 40  
Col3=Field3 Integer Width 40  
Col4=Field4 Date Width 15  
comment=my comment

```

If you don’t need a header row (as in this example), set the parameter `HDR=No` in the connection string. Also, be sure to set Read and Write/Modify permissions on the folder which contains the `EXPORT2TEXT.txt` file.

Reference: [http://www.connectionstrings.com/?carrier=textfile](http://www.connectionstrings.com/?carrier=textfile)
