views:

47

answers:

0

I'm trying to read in an Excel spreadsheet with C#/ASP.net. This entry here works great if the workbook is on my local drive.

However, when I attempt to access any workbook on a network share, I only get the first 30 rows of data.

When I used File.Copy to copy the file to the local drive of the server, I only get 35kb (and the resulting file only has 30 rows of data in it when I open it in Excel).

How can I get the file to open in full over the network, or how can I copy the full file to the local drive first?

Edit: I should note that manually copying the file works perfectly fine. Opening the file over the network shows the full contents of the file in Excel. Only when accessing the file through the ASP.NET application does it limit it's self to 35kb. There must be a setting that terminates the connection after this limit, but I don't know where it is.

Edit2: Code I am using to copy the file:

File.Copy("\\\\server\\share\\path\\to\\file\\workbook.xls","c:\\workbook.xls");