Hi All,
i have written a function that would send email and have an excel attachment. This function is working well but while receiving the email, i am unable to open the attachment, facing below error.
"Excel cannot open file X because the file format or file extension is not valid.Verify that the file has not been corrupted and the file extension matches the file."
The file content is got by converting an ListToExcel and storing this data in an entity, later i am retriving the stored content and passing it as FileContent for the AttachFile function.
Appreciate any help in figuring out the cause of error on opening attachment. Thanks.
MS Excel has the following observed MIME types:
application/vnd.ms-excel
application/msexcel
application/x-msexcel
application/x-ms-excel
application/x-excel
application/x-dos_ms_excel
application/xls
application/x-xls
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
Try to use official mime type.
Thanks and Best Regards,
Nuno Pereira
Nuno Gonçalo Pereira wrote:
Thanks this worked.
Hi!
Have you verify if the content is correct, downloading it directly?
Regards
Graça
Maria da Graça Peixoto wrote:
Hi,
i just created a screen to download the content from the saved entity. it is working well.