FRENDS⁴ Common Components : Frends.Common.Data.ConvertData.ConvertToCSV

This task takes an object as an input, which is the converted to CSV according to the following rules and parameters.

Input Parameters

  • Input
    • The object that is converted to JSON. Input can be given in the following formats:
      • XML as a C# String
      • JSON as a C# String
      • C# DataSet with two-dimensional DataTable
      • C# XmlDocument
      • C# XDocument
      • C# JObject
  • CSVSeparator
    • Enter the CSV separator here as a string, for example ,
    • Otherwise leave empty

Output Result

  • String
    • A string containing the converted CSV

Example Usage

For example calling this task, with the following C# JSON String input:

{
    'dbo.CDInformation': [
      {
        'Title': 'Dark Side of The Moon',
        'Artist': 'Pink Floyd',
        'Country': 'GB',
        'Company': 'Records Label',
        'Price': '10.00',
        'Year': '1989'
      }
    ]
}
 

Will produce the following CSV document:

Title,Artist,Country,Company,Price,Year
Dark Side of The Moon,Pink Floyd,GB,Records Label,10.00,1989