I am trying to import data from an .xlsx document. It keeps reading the data types incorrectly. I need every column to come in as a string.
My connection string looks like this:
"Provider=Microsoft.ACE.OLEDB.12.0; Data Source = " + FileName + "; Extended Properties = 'Excel 12.0 Xml; HDR = Yes; IMEX = 1';"
You may want to try something like linqtoexcel this turns excel worksheets into objects which can be queried using linq queries. Then you can turn columns into string if you want to by quering the linq objects.