tag:blogger.com,1999:blog-4696086498752533600.post3109994652606292166..comments2023-10-23T10:05:31.879-07:00Comments on Aspdotnet-Sharepoint: Export excel data to sharepoint list in sharepoint 2010Bhaskarahttp://www.blogger.com/profile/15492891651384512858noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-4696086498752533600.post-50636530764191124012012-09-27T05:35:43.616-07:002012-09-27T05:35:43.616-07:00We can access excel file by using UNC path
so we...We can access excel file by using UNC path<br /><br />so we have to change the file path from <br />"http://server/salesreport/Book2.xlsx" to<br />"\\servername\salesreport\Book2.xlsx"<br /><br />here sales report is the document library Bhaskarahttps://www.blogger.com/profile/15492891651384512858noreply@blogger.comtag:blogger.com,1999:blog-4696086498752533600.post-56114667853323492212012-09-27T05:19:27.765-07:002012-09-27T05:19:27.765-07:00string ExcelfileName = Path.GetFileName("http...string ExcelfileName = Path.GetFileName("http:/server/salesreport/Book2.xlsx");<br /> string ExcelileLocation = HttpContext.Current.Request.MapPath(ExcelfileName); <br /><br /> String connectionString = String.Format(@"Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Extended Properties=""Excel 8.0;HDR=YES;IMEX=1;""", ExcelileLocation);<br /> <br /><br />The above code gives error because ExcelileLocation is not returning the correct path of the excel file. Can you tell me what is the correct way of getting the correct location of the excel file stored in Sharepoint document libray?sharmilahttps://www.blogger.com/profile/06515267291245842592noreply@blogger.com