case class ExcelOptions(sheetName: Option[String] = None, numLinesToSkip: Option[Int] = None, startColumn: Option[String] = None, endColumn: Option[String] = None, rowLimit: Option[Int] = None, useHeader: Boolean = true, treatEmptyValuesAsNulls: Option[Boolean] = Some(true), inferSchema: Option[Boolean] = Some(true), timestampFormat: Option[String] = Some("dd-MM-yyyy HH:mm:ss"), dateFormat: Option[String] = None, maxRowsInMemory: Option[Int] = None, excerptSize: Option[Int] = None) extends Product with Serializable

Options passed to org.apache.spark.sql.DataFrameReader and org.apache.spark.sql.DataFrameWriter for reading and writing Microsoft Excel files. Excel support is provided by the spark-excel project (see link below).

sheetName

Optional name of the Excel Sheet to read from/write to.

numLinesToSkip

Optional number of rows in the excel spreadsheet to skip before any data is read. This option must not be set for writing.

startColumn

Optional first column in the specified Excel Sheet to read from (as string, e.g B). This option must not be set for writing.

endColumn

Optional last column in the specified Excel Sheet to read from (as string, e.g. F).

rowLimit

Optional limit of the number of rows being returned on read. This is applied after numLinesToSkip.

useHeader

If true, the first row of the excel sheet specifies the column names (default: true).

treatEmptyValuesAsNulls

Empty cells are parsed as null values (default: true).

inferSchema

Infer the schema of the excel sheet automatically (default: true).

timestampFormat

A format string specifying the format to use when writing timestamps (default: dd-MM-yyyy HH:mm:ss).

dateFormat

A format string specifying the format to use when writing dates.

maxRowsInMemory

The number of rows that are stored in memory. If set, a streaming reader is used which can help with big files.

excerptSize

Sample size for schema inference.

Annotations
@Scaladoc()
See also

https://github.com/crealytics/spark-excel

Linear Supertypes
Serializable, Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ExcelOptions
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ExcelOptions(sheetName: Option[String] = None, numLinesToSkip: Option[Int] = None, startColumn: Option[String] = None, endColumn: Option[String] = None, rowLimit: Option[Int] = None, useHeader: Boolean = true, treatEmptyValuesAsNulls: Option[Boolean] = Some(true), inferSchema: Option[Boolean] = Some(true), timestampFormat: Option[String] = Some("dd-MM-yyyy HH:mm:ss"), dateFormat: Option[String] = None, maxRowsInMemory: Option[Int] = None, excerptSize: Option[Int] = None)

    sheetName

    Optional name of the Excel Sheet to read from/write to.

    numLinesToSkip

    Optional number of rows in the excel spreadsheet to skip before any data is read. This option must not be set for writing.

    startColumn

    Optional first column in the specified Excel Sheet to read from (as string, e.g B). This option must not be set for writing.

    endColumn

    Optional last column in the specified Excel Sheet to read from (as string, e.g. F).

    rowLimit

    Optional limit of the number of rows being returned on read. This is applied after numLinesToSkip.

    useHeader

    If true, the first row of the excel sheet specifies the column names (default: true).

    treatEmptyValuesAsNulls

    Empty cells are parsed as null values (default: true).

    inferSchema

    Infer the schema of the excel sheet automatically (default: true).

    timestampFormat

    A format string specifying the format to use when writing timestamps (default: dd-MM-yyyy HH:mm:ss).

    dateFormat

    A format string specifying the format to use when writing dates.

    maxRowsInMemory

    The number of rows that are stored in memory. If set, a streaming reader is used which can help with big files.

    excerptSize

    Sample size for schema inference.

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native() @HotSpotIntrinsicCandidate()
  6. val dateFormat: Option[String]
  7. val endColumn: Option[String]
  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. val excerptSize: Option[Int]
  10. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  11. def getDataAddress: Option[String]
  12. val inferSchema: Option[Boolean]
  13. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  14. val maxRowsInMemory: Option[Int]
  15. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  16. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  17. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  18. val numLinesToSkip: Option[Int]
  19. val rowLimit: Option[Int]
  20. val sheetName: Option[String]
  21. val startColumn: Option[String]
  22. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  23. val timestampFormat: Option[String]
  24. def toMap(schema: Option[StructType]): Map[String, Option[Any]]
  25. val treatEmptyValuesAsNulls: Option[Boolean]
  26. val useHeader: Boolean
  27. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  29. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] ) @Deprecated
    Deprecated

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped