Link to home
Create AccountLog in
Avatar of garethtnash
garethtnashFlag for United Kingdom of Great Britain and Northern Ireland

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
SOLUTION
Avatar of Steven Kribbe
Steven Kribbe
Flag of Netherlands image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
SOLUTION
Avatar of Scott Fell
Scott Fell
Flag of United States of America image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER CERTIFIED SOLUTION
Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
Avatar of garethtnash

ASKER

Thank you All

Superb