Spire.XLS is a professional Excel API that enables developers to create, manage, manipulate, convert and print Excel worksheets. Get free and professional technical support for Spire.XLS for .NET, Java, Android, C++, Python.

Tue Aug 18, 2020 3:49 pm

Hi...
Please how I Can Read a data from excel file and upload it to my database in Asp.net MVC Core ....
Thank you...

hamzasukkar
 
Posts: 16
Joined: Wed Mar 25, 2020 8:47 am

Wed Aug 19, 2020 10:12 am

Hello,

Thanks for your post.
Our Spire.XLS supports exporting data from Excel to a DataTable in Asp.net MVC Core application. Please use our latest package (Spire.XLS Pack(Hotfix) Version:10.8.3) from the following links and refer to the sample code to have a test. If there is any question, welcome to write us.
Website link: https://www.e-iceblue.com/Download/download-excel-for-net-now.html
Nuget link: https://www.nuget.org/packages/Spire.XLS/
Code: Select all
//Load xlsx file
Workbook workbook = new Workbook();
workbook.LoadFromFile("test.xlsx");
//Get the first worksheet
Worksheet sheet = workbook.Worksheets[0];
//Specify the cell range
CellRange range = sheet.Range[1, 1, 3, 2];
//exporte data to a DataTable
DataTable dt = sheet.ExportDataTable(range, true, true);

Sincerely,
Sofia
E-iceblue support team
User avatar

Sofia.Yang
 
Posts: 84
Joined: Tue Jul 14, 2020 1:41 am

Wed Sep 02, 2020 9:36 am

Thank you...
It's work

hamzasukkar
 
Posts: 16
Joined: Wed Mar 25, 2020 8:47 am

Thu Sep 03, 2020 7:09 am

Hello,

Thanks for your feedback.
If you encounter any issue related to our products in the future, just feel free to contact us.
Wish you all the best!

Sincerely,
Sofia
E-iceblue support team
User avatar

Sofia.Yang
 
Posts: 84
Joined: Tue Jul 14, 2020 1:41 am

Return to Spire.XLS