Code Monkey home page Code Monkey logo

galaxy-csv-processor's Introduction

Galaxy CSV Processor

This code is meant to be used within an Excel VBA project to assist with the import and export of Galaxy Dump files from Wonderware System Platform.

Installation

To "install" you should create a macro enabled workbook and import the three files. There is a single form where the user can execute the functions.

Also due to custom export function you will need to add a reference to Microsoft ActiveX Data Objects 2.5 Library under Tool->References when yoou are in VBA editor.

More Detailed Instructions: To import the files, press Alt+F11 to open the VBA editor from Excel. Go to File --> Import and browse to the file location. Note that when you import the .FRM file, the .FRX file is imported automatically.

To actually use any of this, you will need to run the macro that you just imported so you can access the form that you just imported. Save the file and exit the VBA editor to return to the Excel worksheet. Go to the "Insert" menu in the ribbon at the top, and select "Shapes". Pick any shape (I personally prefer the smiley face) and customize it to look like whatever you want. Right click on the shape and pick "Assign Macro" from the context menu. Select the "ShowForm" macro and click "OK". Save the file as an Excel Macro Enabled Work Book (.xlsm).

Functions

Import

The import function allows the user to specify a single CSV file for import. After import the code will automatically apply the built in text to columns step. After splitting the data into columns the code will create a new worksheet for each different template type and move the appropriate contents to that sheet.

Save

The save functions works in reverse of the import function. The save function will take some or all of the worksheets and combine them into a single worksheet. After combining the worksheets the code will execute a save as CSV to export a single CSV file. The user may select to export all sheets or just selected sheets. One key point to consider is that this code will synthesize CSV text as opposed to automatically generating from Excel. The reason is that Excel can not directly save CSV as UTF-8. So we create CSV text and save as UTF-8. This was driven off a user request and filed as Issue #1

Contributors

  • Andy Robinson, Principal of Phase 2 Automation.
  • Anonymous - a special thanks to an anonymous contributor who provided code and inspiration to finish the work that I started long ago. Thanks!

License

MIT License. See the LICENSE file for details.

galaxy-csv-processor's People

Contributors

arobinsongit avatar facundograziani avatar tzunoch 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.