Re: How to Read Excel file in Spark 1.4

2015-07-13 Thread Sandy Ryza
Hi Su,

Spark can't read excel files directly.  Your best best is probably to
export the contents as a CSV and use the csvFile API.

-Sandy

On Mon, Jul 13, 2015 at 9:22 AM, spark user spark_u...@yahoo.com.invalid
wrote:

 Hi

 I need your help to save excel data in hive .


1. how to read excel file in spark using spark 1.4
2. How to save using data frame

 If you have some sample code pls send

 Thanks

 su



Re: How to Read Excel file in Spark 1.4

2015-07-13 Thread Reynold Xin
What Sandy meant was there was no out-of-the-box support in Spark for
reading excel files. However, you can still read excel:

If you are using Python, you can use Pandas to load an excel file and then
convert it into a Spark DataFrame.

If you are using the JVM, you can find any excel library for Java/Scala to
read excel files either in the driver, or read them in parallel on workers
if you have lots of excel files.


Note that this question does not really belong in the dev list. It should
be sent to the user list or asked on stackoverflow.


On Mon, Jul 13, 2015 at 10:16 AM, Sandy Ryza sandy.r...@cloudera.com
wrote:

 Hi Su,

 Spark can't read excel files directly.  Your best best is probably to
 export the contents as a CSV and use the csvFile API.

 -Sandy

 On Mon, Jul 13, 2015 at 9:22 AM, spark user spark_u...@yahoo.com.invalid
 wrote:

 Hi

 I need your help to save excel data in hive .


1. how to read excel file in spark using spark 1.4
2. How to save using data frame

 If you have some sample code pls send

 Thanks

 su