Using ASP I want to identify an uploaded Excel file that has had its extension changed to .csv, but the data in it is still binary, not text.
I have users uploading files that are suppose to be properly converted from Excel to text/csv format. Unfortunately some users take an Excel file and just manually change the extension from .xls to .csv, thus creating an unreadable text file when I go to retrieve it.
I tried to trap for ContentType, but I get "text/plain" as an answer, whether the file is a corrupt Excel file or legitamite text/csv file. Is there a way to to test the type of file in ASP beyond just using ContentType? Once I upload I try to do a bulk copy with the files using SQL Server and all I need is one of these files to be corrupt to crash everything with an ADO stream error.
I have users uploading files that are suppose to be properly converted from Excel to text/csv format. Unfortunately some users take an Excel file and just manually change the extension from .xls to .csv, thus creating an unreadable text file when I go to retrieve it.
I tried to trap for ContentType, but I get "text/plain" as an answer, whether the file is a corrupt Excel file or legitamite text/csv file. Is there a way to to test the type of file in ASP beyond just using ContentType? Once I upload I try to do a bulk copy with the files using SQL Server and all I need is one of these files to be corrupt to crash everything with an ADO stream error.