Closed zekePhoenix closed 3 years ago
Does it work if you attach only the xlsx file?
Yes. Same error when only attaching the xlsx file.
chan$send_message(paste0("Here is the Daily COBRA report for ",format(date_today,"%m-%d-%Y")), attachments = "C:\\RTasks\\DailyCOBRAEmail\\Book99.xlsx")
Error in process_response(res, match.arg(http_status_handler), simplify) : Bad Request (HTTP 400). Failed to complete operation. Message: File contentUrl extension: '.xlsx&action=default&mobileredirect=true' and name extension: '.xlsx' do not match.
Ugh, Microsoft making life difficult....
It figures Microsoft would make it difficult. Are you able to replicate the issue? I had the same issue with csv file. But not with a docx file. 🤷
I have a fix in the parent-item branch. Can you let me know if it works?
Yes. It works now. For both xlsx files and csv files. Thanks.
I'm trying to add an excel file to a channel chat. I have no isses attaching a PDF. But I'm getting this error when I attempt to attach either a xlsx or csv file.
Error in process_response(res, match.arg(http_status_handler), simplify) : Bad Request (HTTP 400). Failed to complete operation. Message: File contentUrl extension: '.xlsx&action=default&mobileredirect=true' and name extension: '.xlsx' do not match.
Here is the code for attaching the PDF. This works as expected.
chan$send_message(paste0("Here is the Daily COBRA report for ",format(date_today,"%m-%d-%Y")), attachments = "C:\\RTasks\\DailyCOBRAEmail\\Test PDF.pdf")
I get the error when adding in an xlsx file.
chan$send_message(paste0("Here is the Daily COBRA report for ",format(date_today,"%m-%d-%Y")), attachments = c("C:\\RTasks\\DailyCOBRAEmail\\Test PDF.pdf","C:\\RTasks\\DailyCOBRAEmail\\Book99.xlsx"))
Thanks.