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

138
Views
Para exportar solo elementos de lista filtrados en una vista de SharePoint a Excel

Estoy tratando de exportar datos filtrados de la lista de SharePoint para sobresalir mediante Agregar un elemento web >> Medios y contenido >> Editor de contenido. Funciona bien en la lista principal de sitios. El problema al que me enfrento es que no funciona cuando creo un subsitio y en ese subsitio tengo una lista para exportar. Solo funciona allí en un modo de edición tan pronto como guardo la página de edición que ya no exporta.

A continuación se muestra mi código: que se cargó en la Galería de activos del sitio como .txtfile

 <script src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.3.1.min.js"></script> <script> function fnExcelReport() { $('.ms-listviewtable').css({ 'border-collapse': 'collapse', 'border': '1px solid #ddd' }); $('.ms-listviewtable tr td').css({ 'border': '1px solid #ddd' }); var tab_text = $('.ms-listviewtable')[0].outerHTML; debugger; $(tab_text).find("tr td:first-child").remove(); tab_text = tab_text.replace(/<A[^>]*>|<\/A>/g, ""); tab_text = tab_text.replace(/<img[^>]*>/gi, ""); tab_text = tab_text.replace(/<input[^>]*>|<\/input>/gi, ""); var ua = window.navigator.userAgent; var msie = ua.indexOf("MSIE "); if (msie > 0 || !!navigator.userAgent.match(/Trident.*rv\:11\./)) { txtArea1.document.open("txt/html", "replace"); txtArea1.document.write(tab_text); txtArea1.document.close(); txtArea1.focus(); sa = txtArea1.document.execCommand("SaveAs", true, "ActionPoints.xls"); } else tab_text = excelExportHtml(tab_text, true) sa = window.open('data:application/vnd.ms-excel,' + encodeURIComponent(tab_text)); return (sa); } function excelExportHtml(table, includeCss) { var html = "<html><head>"; html += "</head><body>" + table + "</body></html>"; return html; } </script> <body> <input type="button" value="Export To Excel" onclick="fnExcelReport();" /> <iframe id="txtArea1"></iframe> </body>

Cualquier guía o sugerencia sobre cómo hacer que esto funcione sería muy apreciada.

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!