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

294
Views
Herramienta gratuita de archivos Angular *.docx y *.xlsx para obtener una vista previa dentro de la aplicación usando Biblioteca como 'ngx-doc-viewer2' u Otro

Han pasado 3 días, estoy buscando una solución para mostrar mi archivo *.docx y *.xlxs en mi aplicación angular. Tengo una API que devuelve los archivos como blob. Ahora, quiero usar ese blob para mostrar el archivo. Puedo descargar fácilmente el archivo usando window.open(blobLink) , sin embargo, mi tarea principal era ver el archivo. Entonces, busqué y encontré ngx-doc-viewer y no funciona con el enlace de blob como encontré actualmente y el archivo necesitaba ser de acceso público. Pero, mi aplicación se ejecutará en la red local. Entonces, ¿cómo puedo resolver este problema? Aquí está mi código *.ts y HTML a continuación =>
TS

 getFile(fileData: File) { this.tempBlob= null; this.ProposalService.getFile(fileData).subscribe( (retFileData: any) => { this.tempRetFileData = retFileData; }, (err: Error) => { }, () => { const blob = new Blob([this.tempRetFileData], { type: this.contentType }); this.docURL = window.URL.createObjectURL(blob); } ); }

HTML

 <ngx-doc-viewer [url]="docURL" viewer="google" style="width:100%;height:50vh;"></ngx-doc-viewer>

Nota: Se acepta cualquier otra biblioteca y solución gratuita.

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!