GithubHelp home page GithubHelp logo

orbitcowboy / wxautoexcel Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pbfordev/wxautoexcel

0.0 3.0 0.0 5.88 MB

wxAutoExcel is a wxWidgets library attempting to make Microsoft Excel automation with C++ a bit less painful.

Home Page: http://pbfordev.github.io/wxAutoExcel/

CMake 8.04% Batchfile 0.11% C++ 91.74% C 0.11%

wxautoexcel's Introduction

wxAutoExcel Build status

Introduction

wxAutoExcel is a wxWidgets (requires v3.1 or newer) C++ library attempting to make automating Microsoft Excel easier.

Platforms

Microsoft Windows, requires Microsoft Excel to be installed.

Installing and Using wxAutoExcel

See docs/install.txt for instructions how to set-up and build wxAutoExcel and how to use it in your projects. I strongly suggest checking the tutorial and bundled samples to see the basics of wxAutoExcel in action. Documentation is available at http://pbfordev.github.io/wxAutoExcel/

Example of Code Using wxAutoExcel

The simple code below: (1) starts a new Microsoft Excel instance, adds a new workbook, (2) writes a string into the A1 cell of the first worksheet of the newly added workbook, (3) sets the text color of the A1 cell to blue, and (4) displays the window of the new Microsoft Excel instance.

#include <wx/wxAutoExcel.h>

using namespace wxAutoExcel;

// the following code is assumed to be inside 
// a function returning a bool

wxExcelApplication app = wxExcelApplication::CreateInstance();
if ( !app )
{
    wxLogError(_("Could not launch Microsoft Excel. Please check that it is properly installed."));
    return false;
}

wxExcelWorkbook workbook = app.GetWorkbooks().Add();
if ( !workbook )
{
    wxLogError(_("Failed to create a new workbook."));
    return false;
}

wxExcelRange range = workbook.GetWorksheets()[1].GetRange("A1");
range = "Hello, World!";
range.GetFont().SetColor(*wxBLUE);

app.SetVisible(true);

Licence

wxWidgets licence

wxautoexcel's People

Contributors

pbfordev avatar

Watchers

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