public class ExcelParserController : ApiController
{
[HttpGet]
public IEnumerable<string> Get(string templatePath)
{
ExcelParser excelParser = new ExcelParser();
return excelParser.Parse(templatePath);
}
}
This is my first idea. But I cannot know how to read local excel file from server. templatePath is like "C:\1.xlsx". How to open local file by using webapi?