Query Data In A Multi-Line Csv File
Greetings,
I am new to VBScript and am unable to find functions that can perform the query I need. I'm hoping someone can point me in the right direction.
I have a text object on my template called "Route Number". When I print the label, I want to populate the route number by querying it from a CSV file.
At time of printing, I’m trying to figure out how to query the route number from the CSV file, based on a known delivery Zip.
Here's a sample of the data rows in my CSV file (first row contains field headers). The CSV file
resides on the user’s workstation.
Region,ZIP,DEFAULT SERVICE,SATURDAY OVERNITE,ROUTE
AZ,85004,P,Y,1450
AZ,85005,P,Y,1474
AZ,85006,P,Y,1454
AZ,85027,P,Y,1471
AZ,85028,P,Y,1473
For example, using the data above, if the known delivery Zip is 85027, I want my query to display route number 1471 on the label.
Any help or guidance is very appreciated. Thank you!
-
You should review the training videos associated with linking a datafile to your format and then querying it. It sounds like you're making the issue more complicated than needed. You likely do not need any manual VB scripting:
Reading Label Data from a Database or Excel Spreadsheet
Selecting Records from a Database at Print Time0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
1 Kommentar