Excel file import [R recipe]

Solved!
B2oriel
Level 1
Excel file import [R recipe]

I have an Excel file in a managed folder, I can't read my file using :

data <- dkuManagedFolderDownloadPath("dsdsJk", "file")

Even using the different options of as = : "raw", "text", "parsed" I get nothing.

0 Kudos
1 Solution
CatalinaS
Dataiker

You can read an Excel file from a managed folder using a code like below:

library(dataiku)
library(xlsx)

content <- dkuManagedFolderDownloadPath("hRJwLbQS","xl2.xlsx", as = "raw")
temp_f=tempfile()
writeBin(object=content, con=temp_f)
read.xlsx(temp_f, sheetName="Sheet1")

 

View solution in original post

2 Replies
CatalinaS
Dataiker

You can read an Excel file from a managed folder using a code like below:

library(dataiku)
library(xlsx)

content <- dkuManagedFolderDownloadPath("hRJwLbQS","xl2.xlsx", as = "raw")
temp_f=tempfile()
writeBin(object=content, con=temp_f)
read.xlsx(temp_f, sheetName="Sheet1")

 

B2oriel
Level 1
Author

Thank you, everything is working as I expect

0 Kudos

Labels

?

Setup info

?
A banner prompting to get Dataiku