# Text Export

Use the Text export filter for transmitting raw data with little or no formatting using ActiveReports. Learn its usage and useful properties in documentation

## Content

Plain Text is a format that opens in Notepad or Microsoft Excel depending on the file extension you use in the filePath parameter of the [Export](/activereportsnet/api/v20.1/MESCIUS.ActiveReports.Export.Xml/GrapeCity.ActiveReports.Export.Xml.Section.TextExport.html) method. Use the extension **.txt** to open files in Notepad, or use **.csv** to open comma separated value files in Excel. The Text export filter has a number of useful properties that allow you to control your output. You can set the properties either in code using the [TextExport](/activereportsnet/api/v20.1/MESCIUS.ActiveReports.Export.Xml/GrapeCity.ActiveReports.Export.Xml.Section.TextExport.html) object after adding reference to **MESCIUS.ActiveReports.Export.Xml** package in your project.

## Text Export Properties

| Property | Valid Values | Description |
| -------- | ------------ | ----------- |
| [Encoding](/activereportsnet/api/v20.1/MESCIUS.ActiveReports.Export.Xml/GrapeCity.ActiveReports.Export.Xml.Section.TextExport.html) | System.Text.ASCIIEncoding (default), System.Text.UnicodeEncoding, System.Text.UTF7Encoding, or System.Text.UTF8Encoding | This property can only be set in code. Enter an enumerated system encoding value to use for character encoding. |
| [PageDelimiter](/activereportsnet/api/v20.1/MESCIUS.ActiveReports.Export.Xml/GrapeCity.ActiveReports.Export.Xml.Section.TextExport.html) | String | Enter a character or sequence of characters to mark the end of each page. |
| [PreserveHiddenText](/activereportsnet/api/v20.1/MESCIUS.ActiveReports.Export.Xml/GrapeCity.ActiveReports.Export.Xml.Section.TextExport.PreserveHiddenText.html) | Auto (default), False, or True | Indicates whether invisible text and partially cut-off text are exported. |
| [QuotationMode](/activereportsnet/api/v20.1/MESCIUS.ActiveReports.Export.Xml/GrapeCity.ActiveReports.Export.Xml.Section.TextExport.html) | AutoQuote (default) or AlwaysQuote | Specifies whether to add double quotes to the exported data. \* **AutoQuote** – Simple values are exported without quotes. The quotes are added only when the data contains column or row delimiters. This is the default export behavior. \* **AlwaysQuote** – Exported values are always quoted. |
| [QuotationSymbol](/activereportsnet/api/v20.1/MESCIUS.ActiveReports.Export.Xml/GrapeCity.ActiveReports.Export.Xml.Section.TextExport.html) | Char | Enter a character to use as quotation mark in the exported text file. Only fields with delimiter characters are quoted. |
| [SuppressEmptyLines](/activereportsnet/api/v20.1/MESCIUS.ActiveReports.Export.Xml/GrapeCity.ActiveReports.Export.Xml.Section.TextExport.html) | True (default) or False | Set to False if you want to keep empty lines in the exported text file. Otherwise, white space is removed. |
| [TextDelimiter](/activereportsnet/api/v20.1/MESCIUS.ActiveReports.Export.Xml/GrapeCity.ActiveReports.Export.Xml.Section.TextExport.html) | String | Enter a character or sequence of characters to mark the end of each text field. This is mainly for use with CSV files that you open in Excel. |

### Text Export usage and limitations

**Usage**:

* Create plain text files
* Create comma (or other character) delimited text files
* Feed raw data to spreadsheets or databases
* Open in Notepad or Excel (comma delimited)

**Does not support anything but plain fields and labels**:

* Supports plain text only with no formatting other than simple delimiters
* Supports encoding for foreign language support

## Export Report using Text Export Filter

Use the following steps to export reports through Text export filters.

2. Create a new or open an existing Windows Forms App (.NET Framework or .NET) in Visual Studio project.
3. Go to the Project Explorer, right-click the project and select **Add** \> **New Item.**
4. Select **ActiveReports 20 Standalone Report** \> **Add** and choose **Section** report type, and then click **Finish**.
    The xml-based Section report (report.rpx) is added.
5. Add a reference to **MESCIUS.ActiveReports.Export.Xml** package in the project. See [Manage ActiveReports Dependencies](/activereportsnet/docs/v20.1/devops/install-activereports/manage-ar-dependencies) for more information.
6. In your project's **Bin > Debug** folder, place the **report.rpx** (Section Report).
7. On the Form.cs or Form.vb, double-click the title bar to create the Form\_Load event.
8. In **Form\_Load event**, add the following code to export Section Reports .

    ```vbnet
    ' Create a Section report.
    Dim rpt As New GrapeCity.ActiveReports.SectionReport()
    
    ' For the code to work, report.rpx must be placed in the bin\debug folder of your project.
    Dim xtr As New System.Xml.XmlTextReader(Application.StartupPath + "\report.rpx")
    rpt.LoadLayout(xtr)
    rpt.Run()
    
    ' Export the report in Text format.
    Dim TextExport1 As New GrapeCity.ActiveReports.Export.Xml.Section.TextExport()
    TextExport1.Export(rpt.Document, Application.StartupPath + "\TextExpt.txt")
    ```

    ```csharp
    // Create a Section Report.
    GrapeCity.ActiveReports.SectionReport rpt = new GrapeCity.ActiveReports.SectionReport();
    
    // For the code to work, report.rpx must be placed in the bin\debug folder of your project.
    System.Xml.XmlTextReader xtr = new System.Xml.XmlTextReader(Application.StartupPath + "\report.rpx");
    rpt.LoadLayout(xtr);
    rpt.Run();
    
    // Export the report in Text format.
    GrapeCity.ActiveReports.Export.Xml.Section.TextExport TextExport1 = new GrapeCity.ActiveReports.Export.Xml.Section.TextExport();
    TextExport1.Export(rpt.Document, Application.StartupPath + "\TextExpt.txt");
    ```