You would need to attach a click event listener to your Submit/Export button. In the listener function, you could get DataTables widget's full data with this command:
function ExportClicked() {
var dtData = dataTables1.rows().data(); // "dataTables1" is the PHP id/name of the DataTables widget
// Set dtData to either a hidden input's value and submit a form to export.php/export route
// or add it to an ajax/xhr request's data and send the request to export.php/export route
}
Finally in your export.php/export route, get dtData, then test/check/sanitize/validate and insert them into your database.