Uploading an Excel sheet and importing the data into SQL Server database

前端 未结 9 1657
闹比i
闹比i 2020-11-29 01:08

I am developing this simple application to upload an Excel file (.xlsx) and import the data present in that Excel worksheet into a SQL Server Express database i

9条回答
  •  半阙折子戏
    2020-11-29 01:50

    Try Using

    string filename = Path.GetFileName(FileUploadControl.FileName);
    

    Then Save the file at specified location using:

    FileUploadControl.PostedFile.SaveAs(strpath + filename);
    

提交回复
热议问题