From 0c89e3f7be05343d37ec09f88e1eaa057e9ff835 Mon Sep 17 00:00:00 2001 From: michele Date: Wed, 3 Jan 2024 12:56:57 +0100 Subject: [PATCH] Michele: modifica path destinazione excel --- Controllers/RapportiniController.cs | 5 ++++- Views/Rapportini/Index.cshtml | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Controllers/RapportiniController.cs b/Controllers/RapportiniController.cs index bd17fba..44db214 100644 --- a/Controllers/RapportiniController.cs +++ b/Controllers/RapportiniController.cs @@ -3,6 +3,7 @@ using ClosedXML.Excel; //using DocumentFormat.OpenXml.Spreadsheet; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.Rendering; +using Microsoft.Office.Interop.Excel; using Newtonsoft.Json; using System.Diagnostics; using VirtualTask.Models; @@ -184,7 +185,9 @@ namespace VirtualTask.Controllers var dateFile = anno + mese + giorno + ore + minuti + secondi; - workbook.SaveAs($"C:\\Users\\utente\\Desktop\\ExcelVT\\buoni_{dateFile}.xlsx"); + //workbook.SaveAs($"C:\\Users\\utente\\Desktop\\ExcelVT\\buoni_{dateFile}.xlsx"); + + workbook.SaveAs($"..\\..\\BuoniVT\\buoni_{dateFile}.xlsx"); return RedirectToAction("Index"); } diff --git a/Views/Rapportini/Index.cshtml b/Views/Rapportini/Index.cshtml index 95c8c84..f562ce1 100644 --- a/Views/Rapportini/Index.cshtml +++ b/Views/Rapportini/Index.cshtml @@ -27,6 +27,7 @@
 
} +