This commit is contained in:
gcw_MV9p2JJN 2025-11-18 15:39:06 +08:00
parent ac7f8802ba
commit 204d04eb22

View File

@ -122,9 +122,10 @@ namespace MDM.Controllers.Material
[AllowAnonymous]
public IActionResult ImportTemplateExcel()
{
string path= "./Assets/ImportTemplate";
IWebHostEnvironment webHostEnvironment = (IWebHostEnvironment)App.ServiceProvider.GetService(typeof(IWebHostEnvironment));
string path= "Assets/ImportTemplate";
string sFileName = $"MaterialMODEL.xlsx";
string fullPath = Path.Combine(path, sFileName);
string fullPath = Path.Combine(webHostEnvironment.ContentRootPath,path, sFileName);
(string, string) result = (sFileName,fullPath);
return ExportExcel(result.Item2, result.Item1);
}