Hello, I am trying to open an Excel 2007 file and read the data into a gridview Here is my connection string: Dim strPhysicalPath As String = Server.MapPath('uploads/MyFile.xlsx') Dim objConnMain As New OleDbConnection('Provider=Microsoft.ACE.OLEDB.12.0;Data source=' & strPhysicalPath & ';Extended Properties=''Excel 12.0;HDR=Yes;IMEX=1''') objConnMain.Open() This will open a .xls file (excel 2003) but not a .xlsx file. I get an error that the file is not in the expected format. It of course it works on my local machine. Any ideas? Thanks.
Some dll's did not have the correct permissions on the server. Lucas got it straightened out for me. Thanks
Try reuploading your excel file (make sure you use binary mode when uploading), the file may be corrupted during upload.
Hi, Could you tell me what permissions did he change? I have the exact same problem. I need to know the solution. My app has a production deadline in a month. Any help is welcome. Thanks in advance. Kirthi
i recommend opening a support ticket and refer to this post. Bruce DiscountASP.NET www.DiscountASP.NET