Code Monkey home page Code Monkey logo

uxdm-excel's Introduction

๐Ÿ”€ UXDM Excel

Build Status

This package provides Microsoft Excel source and destination objects for the UXDM data migrator.

Installation

To install the UXDM Excel package, just run the following composer command.

composer require divineomega/uxdm-excel

UXDM Excel Source

The UXDM Excel source allows you to source data from a Microsoft Excel spreadsheet. This can be useful to directly import data from a spreadsheet into a bespoke web application database or other file format.

Creating

To create a new Excel source, you must provide it with the path to the spreadsheet file (*.xlsx) that you wish to use.

The following example creates a Excel source object, using a Users.xlsx file within the same directory.

$excelSource = new ExcelSource(__DIR__.'/Users.xlsx');

Assigning to migrator

To use the Excel source as part of a UXDM migration, you must assign it to the migrator. This process is the same for most sources.

$migrator = new Migrator;
$migrator->setSource($excelSource);

UXDM Excel Destination

The UXDM Excel destination allows you to migrate data into a Microsoft Excel spreadsheet. This can be useful if you wish to export data from your database powered system into a spreadsheet, or simply convert from one format to another.

Creating

To create a new Excel destination, you must provide it with the path to the spreadsheet file (*.xlsx) that you wish to use.

The following example creates a Excel destination object, using a Users.xlsx file within the same directory.

$excelDestination = new ExcelDestination(__DIR__.'/Users.xlsx');

Assigning to migrator

To use the Excel destination as part of a UXDM migration, you must assign it to the migrator. This process is the same for most destinations.

$migrator = new Migrator;
$migrator->setDestination($excelDestination);

Alternatively, you can add multiple destinations, as shown below. You can also specify the fields you wish to send to each destination by passing an array of field names as the second parameter.

$migrator = new Migrator;
$migrator->addDestination($excelDestination, ['field1', 'field2']);
$migrator->addDestination($otherDestination, ['field3', 'field2']);

uxdm-excel's People

Contributors

divineomega avatar

Stargazers

 avatar

Watchers

 avatar  avatar  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.