JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.3/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/datatables/1.10.21/js/jquery.dataTables.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/datatables-buttons/2.3.3/js/dataTables.buttons.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.7/pdfmake.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.10.1/jszip.min.js"></script>
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/2.1.0/css/buttons.dataTables.min.css">
<link rel="stylesheet" href="https://cdn.datatables.net/1.11.3/css/jquery.dataTables.min.css">
<script src="https://cdn.datatables.net/buttons/2.1.0/js/buttons.print.min.js"></script>
<script src="https://cdn.datatables.net/buttons/2.1.0/js/buttons.html5.min.js"></script>
<table id="example" class="display nowrap" style="width:100%">
<thead>
<tr>
<th>Nº</th>
<th>Data</th>
<th>Tipo de Pesquisa</th>
<th>Valor</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>30/01/2023</td>
<td>Qualitativa</td>
<td>150,00</td>
</tr>
<tr>
<td>2</td>
<td>30/01/2023</td>
<td>Qualitativa</td>
<td>110,00</td>
</tr>
</tbody>
</table>
JavaScript
$(document).ready(function() {
$('#example').DataTable( {
dom: 'Bfrtip',
filename:"abc",
buttons: [
'excel',
]
} );
} );