How can I automatically send an email with an excel file containing submissions for a form rather than an email per submission?

You can probably use wp_mail(). You just need to create and save your excel doc first.

$attachments = array(ABSPATH . '/uploads/my.xlsx');

wp_mail($email, 'Testing Attachment' , 'This is an Excel doc', $attachments);

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)