locked
how to insert data into sqlserver from open office excel using asp.net,c# RRS feed

  • Question

  • User1667252885 posted

    how to insert data into sqlserver from open office excel using asp.net,c#

    (for already existing excel and new excel)

    Tuesday, October 29, 2019 12:55 PM

All replies

  • User-719153870 posted

    Hi bobinscaria,

    from open office excel

    Do you mean you want to read from an opening excel file?

    As far as i know, this is not possible because the process will be locked my your MSOffice.

    I made a demo based on code from Read Excel as DataTable using OpenXML and C#, and if i was trying to read an opening excel, the program will throw below exception:

    By the way, i think we have already talked about this subject at How to insert data into open office excel from sql server using c#, if you have any extra related question, please feel free to let me know in that thread instead of opening another two same threads, you can use the "Reply" button to keep on in the same thread.

    Best Regard,

    Yang Shen

    Wednesday, October 30, 2019 2:15 AM