none
Need to read cells in an excel spreadsheet and return a number- from a cell in a spreadsheet

    Question

  • I am a NEWBIE!!! I have just started with vb script.
    What I have is an excel spreadsheet with a few columns displaying zip codes and and columns with numbers 1-4 which stands for a shipping time.
    I need to write the code to read from the excel sheet- zip code columns, and when there is a match to one of the zip codes, return the number in the field next to the zip code- in the spreadsheet-

    Does anyone know if this can be done?

    Thanks!

    Tuesday, June 16, 2009 3:35 PM

All replies

  • First off - you should stop trying to do what you're doing, because it's a dead end: Considerations for Server-Side Automation of Office.

    Instead, you should try to use an Excel Source inside a Data Flow Task to read the contents of the Excel sheet, do your processing/lookup, then write your results.

    One question I have - where are you "returning" this number?  It sounds like you should have two spreadsheets open - one with data and another with your lookup values - but you don't seem to describe that.
    Todd McDermid's Blog
    Tuesday, June 16, 2009 4:19 PM
    Moderator