Coder Social home page Coder Social logo

csvaccess's Introduction

CSV Access

AlphaBooster 에서 CSV file 을 직접 읽어서 Array 저장 후 Lookup 하기 위한 VBA Code

작동 프로세스 및 구조

CSV Access Process

  1. Sub CSVImport(CSVFileName, Array(), KeyCol)
  • CSV data file 의 내용을 TotResultArray 배열에 저장. String 속성의 배열임
  • 1st 파라미터(CSVFileName) : 대상 CSV 파일명
  • 2nd 파라미터(Array()) : CSV 내용을 반환받기 위한 배열
  • 3rd 파라미터(KeyCol) : CSV 내용 중 Key Field 의 위치를 담고 있는 변수. 콤마로 구분
  1. Function VLookup(TargetKey, Array(), j)
  • VLookup Function : 반환값은 반드시 Double type
  • 1st 파라미터(TargetKey) : 찾고자 하는 Key 값
  • 2nd 파라미터(Array()) : Source Array 전체
  • 3rd 파라미터(j) : 값을 가지고 오는 대상 컬럼 순번
  1. Function VLookupAll(TargetKey, Array())
  • VLookupAll Function - VLookup 과 유사하나 TargetKey 에 해당하는 행 값 전체를 반환받음
  • 반환값은 반드시 String Type. comma 로 구분되어있기 때문에 반드시 Split 처리해줘야 함
  • 1st 파라미터(TargetKey) : 찾고자 하는 Key 값
  • 2nd 파라미터(Array()) : Source Array 전체
  1. Function HLookupAll(TargetField, Array())
  • HLookupAll Function - VLookup 과 유사하나 TargetField 에 해당하는 열 값 전체를 반환받음
  • 반환값은 반드시 String Type. comma 로 구분되어있기 때문에 반드시 Split 처리해줘야 함
  • 1st 파라미터(TargetField) : 찾고자 하는 Key 값
  • 2nd 파라미터(Array()) : Source Array 전체

UDF.BAS 의 sub 및 function 을 이용해서 CSV File Access 를 하는 Sample Code

csvaccess's People

Contributors

hyunsikhwang avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.