I have created a dataset of type Row
as below,
Dataset<Row> databaseDs = sparkSession.createDataFrame(dbStatus, Status.class);
I want to convert this to Excel sheet so I used below code for Excel conversion
databaseDs.write()
.format("com.crealytics.spark.excel")
.option("useHeader", "true")
.option("treatEmptyValuesAsNulls", "true")
.option("inferSchema", "true")
.option("addColorColumns", "false").mode("overwrite").save("C:\\resultset.xlsx");
But I am getting
ChangeFileModeByMask error (5): Access is denied
How to resolve this issue as I have the permission to write to c:
folder and still empty files ".resultset.xlsx.crc" and "resultset.xlsx" with 0kb