Hi,
I am trying to read in a password protected excel file using R function.
There's a solution online that works until it tries to read in excel cell formatted as Date or Time. Then it returns an error : `Error: R (1): There was an error in WriteYXDBStreaming`
Anyone had similar issue before?
Thanks in advance!
Code in R:
library("excel.link")
df <- read.Alteryx("#1", mode="data.frame")
filename <- as.character(df[1,"FullPath"])
excel_pwd <- as.character(df[1,"excel_password"])
excel_data <- xl.read.file(filename, xl.sheet = "sheet1", password = excel_pwd, write.res.password=excel_pwd)
write.Alteryx (as.data.frame(excel_data), 1)
Solved! Go to Solution.
Hi @rayJ
The error occurs because excel_data doesn't contain the correct metadata to the directly output it to Alteryx.
Replace your write.Alteryx line with these
output <- lapply(excel_data, as.character)
output <- as.data.frame(output)
write.Alteryx(output, 1)
Dan
User | Count |
---|---|
106 | |
82 | |
70 | |
54 | |
40 |