• Basics
  • Abyss
  • Web APIs
  • C# & Razor
  • .net API
  • JS & TS API
Search Results for

    Show / Hide Table of Contents

    Class Csv

    DataSource for importing/reading CSV files.

    The CSV DataSource is part of the Standard EAV Data Sources.

    It will load data from a CSV file which is usually located in the App folder (but can also be in ADAM).

    These docs are not complete, check out the feature description for now.

    History

    1. Introduced in 2sxc 7.2

    API Documentation

    Inheritance
    object
    ServiceBase
    ServiceBase<DataSourceBase.MyServices>
    DataSourceBase
    CustomDataSourceAdvanced
    Csv
    Implements
    IDataSource
    IAppIdentity
    IZoneIdentity
    IAppIdentityLight
    ICacheKey
    ICacheExpiring
    ITimestamped
    IHasLog
    IDataSourceLinkable
    Inherited Members
    DataSourceBase.Immutable
    DataSourceBase.AppId
    DataSourceBase.ZoneId
    DataSourceBase.Guid
    DataSourceBase.Error
    DataSourceBase.CacheTimestamp
    DataSourceBase.CacheChanged(long)
    DataSourceBase.Configuration
    DataSourceBase.Link
    DataSourceBase.In
    DataSourceBase.TryGetIn(string)
    DataSourceBase.TryGetOut(string)
    DataSourceBase.Out
    DataSourceBase.this[string]
    DataSourceBase.GetStream(string, string, bool, bool)
    DataSourceBase.List
    DataSourceBase.Attach(IDataSource)
    DataSourceBase.Attach(string, IDataSource, string)
    DataSourceBase.Attach(string, IDataStream)
    DataSourceBase.ProvideOut(Func<IEnumerable<IEntity>>, string)
    DataSourceBase.ProvideOut(Func<IImmutableList<IEntity>>, string)
    Namespace: ToSic.Eav.DataSources
    Assembly: ToSic.Eav.DataSources.dll
    Syntax
    [PublicApi_Stable_ForUseInYourCode]
    [VisualQuery(NiceName = "CSV Data", UiHint = "Load data from a CSV file", Icon = "description", Type = DataSourceType.Source, NameId = "ToSic.Eav.DataSources.CsvDataSource, ToSic.Eav.DataSources", DynamicOut = false, ConfigurationType = "|Config ToSic.Eav.DataSources.CsvDataSource", HelpLink = "https://go.2sxc.org/DsCsv")]
    public class Csv : CustomDataSourceAdvanced, IDataSource, IAppIdentity, IZoneIdentity, IAppIdentityLight, ICacheKey, ICacheExpiring, ITimestamped, IHasLog, IDataSourceLinkable
    Remarks
    • Renamed from CsvDataSource to Csv in v15.06 for consistency. Believe this should not affect anybody.

    Properties

    | Improve this Doc View Source

    ContentType

    Name of the content type which the imported entities have. This is fake, but may be necessary for later filtering of the types. Defaults to "CSV"

    Declaration
    [Configuration(Fallback = "CSV")]
    public string ContentType { get; set; }
    Property Value
    Type Description
    string
    Remarks
    • Before v15.03 it defaulted to "Anonymous"
    | Improve this Doc View Source

    Delimiter

    Delimiter character in the CSV, usually a ',' or ';' but could also be a tab or something. Default is tab.

    Declaration
    [Configuration(Fallback = "\t")]
    public string Delimiter { get; set; }
    Property Value
    Type Description
    string
    | Improve this Doc View Source

    FilePath

    Path to the CSV file, relative to the website root

    Declaration
    [Configuration]
    public string FilePath { get; set; }
    Property Value
    Type Description
    string
    | Improve this Doc View Source

    IdColumnName

    Column in the CSV which contains the ID.

    Declaration
    [Configuration]
    public string IdColumnName { get; set; }
    Property Value
    Type Description
    string
    | Improve this Doc View Source

    TitleColumnName

    The CSV column containing the title of the item - for dropdowns etc. and the EntityTitle property.

    Declaration
    [Configuration]
    public string TitleColumnName { get; set; }
    Property Value
    Type Description
    string

    Implements

    IDataSource
    IAppIdentity
    IZoneIdentity
    IAppIdentityLight
    ICacheKey
    ICacheExpiring
    ITimestamped
    IHasLog
    IDataSourceLinkable
    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX