garethtnash
asked on
Classic ASP (VBScript) Validate excel columns (headings) and file format
Hello,
I'm working on a classic ASP application which -
1 - allows the user to upload an excel file
2 - Imports the data from the excel file to a MS SQL database
Ideally before the file is uploaded, and the database stored procedure starts the import process, the ASP (VBScript) application should perform some validation on the file.
Basically I want to confirm that the expected columns existed and are correctly named -
ID
Name
RRP
for instance, so
ID
Name
R.R.P.
Would fail and the upload and subsequent stored procedure would not be executed..
It would also need to only do this if the correct file format has been uploaded (.xls| .CSV)
Any suggestions?
Thank you
I'm working on a classic ASP application which -
1 - allows the user to upload an excel file
2 - Imports the data from the excel file to a MS SQL database
Ideally before the file is uploaded, and the database stored procedure starts the import process, the ASP (VBScript) application should perform some validation on the file.
Basically I want to confirm that the expected columns existed and are correctly named -
ID
Name
RRP
for instance, so
ID
Name
R.R.P.
Would fail and the upload and subsequent stored procedure would not be executed..
It would also need to only do this if the correct file format has been uploaded (.xls| .CSV)
Any suggestions?
Thank you
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
Superb