Download an Excel from a URL and open it for reading?
<p>hi i need to read excel file which is stored in s3 server,i tried but it is showing invalid internet address.please help me to solve</p>

<pre><code>string fullPath = "http://tempfordevelopment.s3.amazonaws.com/ad53498f-74e8-412c-8c8f-e36b18f16e4eEmailExcel2.xlsx";

            //Uri uri = new Uri(fullPath);
            //string excelLocation = uri.LocalPath;

            String sConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0; Data Source=" + fullPath + "; Extended Properties='Excel 8.0;HDR=Yes'";
            System.Data.DataSet DtSet;
            System.Data.OleDb.OleDbDataAdapter MyCommand;
            OleDbConnection objConn = new OleDbConnection(sConnectionString);

            MyCommand = new System.Data.OleDb.OleDbDataAdapter("select * from [Sheet1$]", sConnectionString);
            MyCommand.TableMappings.Add("Table", "Net-informations.com");
            DtSet = new System.Data.DataSet();
            MyCommand.Fill(DtSet);/////Here i am getting error as invalid internet address


            DataTable table = DtSet.Tables[0];

            string[] strings = new string[table.Rows.Count];
            int idx = 0;
            foreach (DataRow row in table.Rows)
            {
                StringBuilder sb = new StringBuilder();
                object[] cells = row.ItemArray;
                for (int i = 0; i &lt; cells.Length; i++)
                {
                    if (i != 0) sb.Append(',');
                    sb.Append(cells[i]);
                }
                strings[idx++] = sb.ToString();
            }
</code></pre>
