spark-hadoopoffice-ds | A Spark datasource for the HadoopOffice library
kandi X-RAY | spark-hadoopoffice-ds Summary
kandi X-RAY | spark-hadoopoffice-ds Summary
A Spark datasource for the HadoopOffice library
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of spark-hadoopoffice-ds
spark-hadoopoffice-ds Key Features
spark-hadoopoffice-ds Examples and Code Snippets
val sRdd = sparkSession.sparkContext.parallelize(Seq(Seq("","","1","A1","Sheet1"),Seq("","This is a comment","2","A2","Sheet1"),Seq("","","3","A3","Sheet1"),Seq("","","A2+A3","B1","Sheet1"))).repartition(1)
val df= sRdd.toDF()
df.write
.format
SQLContext sqlContext = sparkSession.sqlContext;
Dataframe df = sqlContext.read
.format("org.zuinnote.spark.office.excel")
.option("read.locale.bcp47", "en") // example to set the locale to us
.load("/home/user/office/input");
long totalCount
root
|-- decimalsc1: decimal(2,1) (nullable = true)
|-- booleancolumn: boolean (nullable = true)
|-- datecolumn: date (nullable = true)
|-- stringcolumn: string (nullable = true)
|-- decimalp8sc3: decimal(8,3) (nullable = true)
|-- bytecolumn: byte (
Community Discussions
Trending Discussions on spark-hadoopoffice-ds
QUESTION
I Am reading excel file using com.crealytics.spark.excel package. Below is the code to read an excel file in spark java.
...ANSWER
Answered 2017-Jun-25 at 11:15Looks like the library you chose, com.crealytics.spark.excel, does not have any code related to writing excel files. Underneath it uses Apache POI for reading Excel files, there are also few examples.
The good news are that CSV is a valid Excel file, and you may use spark-csv to write it. You need to change your code like this:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install spark-hadoopoffice-ds
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page