I have an 'input file' that the user will upload the worksheet, I need to check if it is .xlsx
or .xls
and scan the data of that worksheet. After that, I need to save these items to Sql
server.
On verifying the extension use this:
var ext = Path.GetExtension(file.FileName);
var allowedExtensions = new[] { ".xlsx", ".xls" };
if(allowedExtensions.Contains(ext)){ //codigo }
Now my biggest doubt is even being able to scan the spreadsheet data and send it to the bank.
Table that will receive the data contains the columns:
- ID
- Registro
- Nome
- Ativo
I'm starting with ASP.NET, it might be very simple and sorry for that.