Class CsvReader

java.lang.Object
com.axelor.data.export.ImportReader
com.axelor.data.export.csv.CsvReader
All Implemented Interfaces:
Closeable, AutoCloseable

public class CsvReader extends ImportReader
  • Constructor Details

    • CsvReader

      public CsvReader(Path path) throws IOException
      Throws:
      IOException
    • CsvReader

      public CsvReader(Path path, String name) throws IOException
      Create a reader for a single CSV file, zip archive or directory of CSV files.

      When the path points to a single CSV file, the given name is used as the source name (which resolves to the target model). This allows importing a flat CSV file whose file name doesn't match the target model (e.g. the file produced by a flat export). If name is null, the file name (without extension) is used instead.

      Parameters:
      path - the CSV file, zip archive or directory
      name - the source name to use for a single CSV file, may be null
      Throws:
      IOException - if the path can't be read
  • Method Details