asp.net - C# Universal OleDb connection to Excel -


i have asp-mvc aplication allows user upload excel file. i'm supporting *.xls files (excel 97-2003) , *.xlsx files (excel 2007+).

once file uploaded, program opens oledb connection excel file using 1 of available drivers:

  • microsoft.ace.oledb.12.0 newest excel file formats.
  • microsoft.jet.oledb.4.0 older excel file formats.

what have @ moment of writing post if block of code checks mime-type of excel file opened , chooses correct driver opening oledb connection. can't support both file formats @ same time.

if execute asp app in 64bit-mode, error:

the 'microsoft.jet.oledb.4.0' provider not registered on local machine.

if execute asp app in 32bit-mode, error:

the 'microsoft.ace.oledb.12.0' provider not registered on local machine.

if there universal microsoft oledb provider able connect versions of excel files?

update: i'm running on 64bit version of windows server 2008 sp1 .net framework 4


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -