Problem in Uploading an excel file with data validation settings onto the server

I have one excel template on the server and i have to download that excel file populating with records from the database. I have downloaded the excel file using Aspose.cells. I have applied certain validation settings on that excel file some at design time and some at run time. While uploading i am capturing the excel file in a stream. I am reading records from this stream and updating those records in database using the following statement

workbook.Open(objStream);

If i download the file and immediately upload it then my application crashes at the above statement. But if i edit that downloaded excel file, save the file on my local machine and then upload that file on server then the above statement works fine. I think, may be, there is problem in saving that excel file while downloading. Can you please help me in this matter

Hi,

What is the error description? How do you save your server excel file after downloading it on the client side...to streams or physical dir or something else? Could you please explain it more and paste your code here, so that we may check and resolve your issue soon.

Thank you.

I am getting the exception "ArguementOutOfRangeException". The description is as follows:-

Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

Following are the lines of code which i am using

HttpContext.Current.Response.ContentType = "application/xls";

HttpContext.Current.Response.AddHeader("content-disposition", "attachment; filename=JobProfiles.xls");

workbook.Save("JobProfiles.xls", SaveType.OpenInExcel, FileFormatType.Default, HttpContext.Current.Response);

Hi,

On which line of code this error occurs. Your part of code does not give us any clue as it works fine here. It will be better for us if you could create a sample test project with your template excel file(s) and post us here to show your problem, so that we may figure out your issue soon.

Thank you.