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
nullvalues (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
- Alphabetic
- By Inheritance
- ExcelOptions
- Serializable
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
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
nullvalues (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
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @HotSpotIntrinsicCandidate()
- val dateFormat: Option[String]
- val endColumn: Option[String]
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- val excerptSize: Option[Int]
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def getDataAddress: Option[String]
- val inferSchema: Option[Boolean]
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val maxRowsInMemory: Option[Int]
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- val numLinesToSkip: Option[Int]
- val rowLimit: Option[Int]
- val sheetName: Option[String]
- val startColumn: Option[String]
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
- val timestampFormat: Option[String]
- def toMap(schema: Option[StructType]): Map[String, Option[Any]]
- val treatEmptyValuesAsNulls: Option[Boolean]
- val useHeader: Boolean
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
Deprecated Value Members
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] ) @Deprecated
- Deprecated