We are trying to upload and process some excel files; there is no need to keep the file, so ideally we'd just like to keep them in memory and do what is necessary without storing the file. We are using the Excel Data Reader, and that part of it is working correctly if we use the TargetFolder setting and save the file. However, if we try to process using only the filestream, there are problems.
The documentation says that the InputStream property returns a system.io.stream object, which is what the reader expects, but when we try to load that object into the excel data reader, the error is;
"Unable to cast object of type 'System.Web.HttpInputStream' to type 'System.IO.FileStream'."
The code is
We've tried casting the inputstream to a system.io.stream object directly, but that also throws an error. The code is using an external class to do the processing, since it's something that is done from various places within the application.
Any suggestions? Anyone out there used RadUpload and processed Excel files on the server in this way?
The documentation says that the InputStream property returns a system.io.stream object, which is what the reader expects, but when we try to load that object into the excel data reader, the error is;
"Unable to cast object of type 'System.Web.HttpInputStream' to type 'System.IO.FileStream'."
The code is
Dim stream As FileStream = lsFile.InputStream
We've tried casting the inputstream to a system.io.stream object directly, but that also throws an error. The code is using an external class to do the processing, since it's something that is done from various places within the application.
Any suggestions? Anyone out there used RadUpload and processed Excel files on the server in this way?