Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

197
Views
Tablas de datos: ¿exportar datos diferentes a los que se muestran en la tabla?

Tengo un script que agrega un botón de exportación a Excel a mis tablas de datos:

 $(document).ready(function() { $('#table_id').DataTable( { dom: 'Brtip', buttons: [ { extend: 'excel', filename: function(){ var today = new Date(); var date = today.getFullYear()+'-'+(today.getMonth()+1)+'-'+today.getDate(); var time = today.getHours() +':'+ today.getMinutes()+':'+today.getSeconds(); var dateTime = date+' '+time; return 'Query ' + dateTime; }, customize: function ( xlsx ) { var sheet = xlsx.xl.worksheets['sheet1.xml']; $('c[r=A1] t', sheet).text( '{{foo_query}}' ); $('c[r=A2] t', sheet).text( '' ); $('row:first c', sheet).attr( 's', '2' ); // first row is bold } } ] } ); });

Esto funciona bien:

ingrese la descripción de la imagen aquí

Sin embargo, solo muestro los 200 resultados principales en la tabla de datos, ya que el marco de datos real es de más de 35 000 y tarda demasiado en cargarse.

Cuando hago clic en el botón de Excel, envía los datos que están en la tabla, pero idealmente quiero que exporte los datos originales que tengo como una variable global llamada 'dataHold'

¿Hay alguna manera de hacer esto?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!