Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

184
Vistas
Increase Width of Datatable Excel Export

I am trying to increase the default with of datatable excel.

Currently, It looks like

enter image description here

I have tried :

oTable = $('#myTable').DataTable({
        dom: 'Bfrtip',
         buttons: [
                    
                    {
                        extend: 'excelHtml5',
                        exportOptions: {
                    columns: [ 0, 1, 2, 3 ]
                },
                customize: function (xlsx) {
  var sheet = xlsx.xl.worksheets['sheet1.xml'];
  var col = $('col', sheet);
  $(col[2]).attr('width', 40);
}
                    },
                    {
                        extend: 'pdf',
                        exportOptions: {
                    columns: [ 0, 1, 2, 3 ]
                }
                    }
                ]
    });

The button is working but it not setting to custom width.

Thank You.

about 4 years ago · Santiago Trujillo
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda