Untitled
unknown
csharp
3 years ago
891 B
7
Indexable
&OutFile = Directory.TemporaryFilesPath + &File.Separator + !"NombreArchivo-" + Guid.NewGuid().toString() + !".xlsx" &ExcelDocument.Open(&OutFile) &ExcelDocument.AutoFit = 1 Do 'CheckStatus' &ExcelDocument.Clear() // Rellenar el excel &ExcelDocument.Save() Do 'CheckStatus' &ExcelDocument.Close() &file.Source = &OutFile &HttpResponse.AddHeader(!"Content-Type", !"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet") &httpResponse.AddHeader(!"Content-Disposition", Format(!"attachment;filename=%1", &file.GetName())) &httpResponse.AddHeader(!"X-Frame-Options",!"sameOrigin") &httpResponse.AddHeader(!"X-Content-Type-Options",!"nosniff") &HttpResponse.AddFile(&FileName) Sub 'CheckStatus' If (&ExcelDocument.ErrCode <> 0) &OutFile = "" &ErrorMessage = &ExcelDocument.ErrDescription &ExcelDocument.Close() Return EndIf EndSub // El PRC debe de ser MAIN HTTP
Editor is loading...