Download 1 to many excel files from Angular Api into zip folder

Discussão em 'Angular' iniciado por JustThatGuy93, Fevereiro 28, 2025.

  1. I've currently got a program that works in downloading a singular file from backend, constructing it into a blob and converting it to an excel. As seen below.

    let filename = 'download' + this.EXCEL_EXTEN
    await this.apiService.getDownload(info).then((response: any) => {
    let download = new Blob([response.data]), {type: 'application/vnd.ms-excel' })
    window['saveAs'](download, filename)
    }) .catch((error) => {
    console.log(error)
    }


    However, my requirements have changed. Instead, I'm being sent back 1 to many excel documents within a .zip folder and I'm not sure how I'm meant to construct the data properly. I've attempted to alter the type to be .zip, which does successfully download a zip, but the folder contains no data.

    Continue reading...

Compartilhe esta Página