问题
when I run code via visual studio (IIS Express) it runs fine and exports xl spreadsheet.
var wb = new XLWorkbook();
var ws = wb.Worksheets.Add(dt, "Sheet1");
wb.SaveAs(fileName);
However when I compile and run on either IIS or IIS Express (on exactly same machine), I get the error
Could not find a part of the path 'C:\...'
Very wierd!
来源:https://stackoverflow.com/questions/60663348/c-sharp-closed-xml-library-with-net-core-3-1-1-works-when-debugging-but-not-w