SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am working with SharePoint 2010. I need to get the data from excel file stored in sharepoint library. I have plans to accomplish this by using OLEDB connection. So I need to download the excel file from doc library and store it in a temporary location and then access this temp file to get data from it. Now my question is which is the best ans safe location to stored the downloaded file? So far I have used SharePoint's layouts directory, C:windows:TEMP and even Path.GetTempFileName(). But the result I get this is " ACCESS DENIED!". Any ideas in temporary location? Is there any other location which is safe?


share|improve this question

I don't think that there is a temporary location. Work in Memory instead:

Get the File:

byte[] data = web.GetFile("YOURFILEURL").OpenBinary();

To read the data you can use Tools like Aspose.Cells. Like this:

Workbook workbook = new Workbook(data);

With the Workbook object you can access your payload data.

share|improve this answer
Any method without having to use third party tools? – sharmila Jan 28 '13 at 10:46

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.