I am having a problem when reading xls file. I dont want to upload the file on the server. I just want to read the file which the user is going to post. Note: This file in not on the server and i want the file format as .xls (not .csv) Using Request.BinaryRead(whatever may be the size of file) it gives me junk characters. Please Help Raghav
your local pc xls file want to read in website is not easy but i give one idea , do you know about IP address ? you pc have live ip ? http://201.203.12.2/ this is the live ip format add virtul Directory "excle" http://201.203.12.2/excle/test.xls file upload all xls file in excel folder in your pc and READ your excle file using Relative path
Shailesh thanks for the help. But the actual situation is I have a web site in which any user(client) can upload the excel file. The user is going to select file from his machine. When the user clicks on upload the page(asp page) is posted back. By using request.binaryread i will get all the contents of the page(asp) including the excel file data contents. But i am not able to convert it in to readable format. My main purpose is that i want the Excel data in the recordset. I have the code to create the recordset when the file resides on the server. And to do that i will have to upload that file on the server and then read it. And after reading the file delete the file from the server. But that is not the solution. By using request.binaryread i am able to read the file by converting it to string. But the same is not working for excel file. Please Help Raghav
http://support.microsoft.com/kb/193998/ try this link for "How To Read and Display Binary Data in ASP"
Shailesh thanks for the link. But the code will work only when the file is on the server. If i upload the file then i can use this code. But my file is which the user uploads and which is not there on the server. Raghav