Classes are Objects which allow you to group a set of related functionality into one group. Once you have defined your class, you instantiate an instance of a class in order to use it. Using classes leads to clean, understandable code. If you are a ‘class newbie’, you may want to first read Getting Started with Classes. Below are some of the classes implemented in the downloadable examples of this site.
You use a class to describe an object. An object is a collection of whatever you like, and encapsulates both the values and references (properties) and actions (methods) associated with that object. You need to understand classes and objects to follow...
This section has moved. Please see the links below.
How to use cDataSet
Data manipulation Classes in Google Apps Script
cDataSet Model
Here is a summary index to all the downloadable code appearing on this site. Its still in progress because its a big , boring job. A better approach is to have a look at Integrate VBA with Github , and see my Github repositories where all this docu...
These classes provide the tools and data structures needed to separate your physical data in your spreadsheet, from how you process it in your procedures. Notice that the row and column numbers begin at 1, and are relative to the start of the dataset ...
The cCell class addresses and manipulates a single excel cell and its contents. You can find the methods and properties documentation on Github . The code is also below
'gistThat@mcpher.com :do not modify this line - see ramblings.mcpher.com for d...
Summary
cDataColumn is a column of cCell . The rowId argument refers to the row either by row name (where we have enabled labels ) or a row number. Where rowId optional and omitted the complete column is operated on. Where rowId is present the the c...
cDataRow is a row of cCell . The sid argument refers to the column either by column name or number. Where sid optional and omitted the complete row is operated on. Where sid is present the cCell ...
Summary CdataSet is a block of cCell consisting of a collection of cDataRow , with an abstraction of a collection of cDataColumn The sid argument refers to the column either by column name or number and the rowID refers to the particular row by nu...
Summary
CDataSets is a collection of cDataSet
You can find the methods and properties documentation on Github .
And the source code is here
Summary
cHeadingRow is a special type of cDataRow and is used for managing the column headers of a cDataSet
You can find the methods and properties documentation on github . And the source code is on Gitbub or below
'gistThat@mcpher.com :do n...
What can you learn here?
Select worksheets to copy
Choose selected columns
cDataSets filtering capability
Copying partial tables between sheets
Get the cDataset.xlm from here
By now you are probably familiar with the cDataSets...
Why abstract anyway?
In a number of articles on this site and elsewhere, I have covered topics such as Getting data from Outlook Address Lists into Excel , Serializing Excel data for input to any Google visualization , Excel Generate High Quality Road...
How to get data into Excel from your outlook address book get it now
Here's a common problem. You have a list of email addresses in Excel and you want to pick up various pieces of data from your contacts or global address list, matched on the email ...
What can you learn here?
Get Started with cDataSet Short code snippets Abbreviated explanations
Quick examples Download the cDataSet.xlm. This is intended to be a fasttrack to get started with the Data Manipulation Classes...
What to download:
All the examples contain all the classes needed for them to work and all projects can be found here .
If you just want the main utility classes used throughout this site, in the downloads section cDataset.xlsm includes everything...
Hopefully you will have read How to use cDataSet to see how to abstract data from your sheet and taken a look at the cDataSet Model to see which methods and properties are available. I almost always use cDataSet when accessing sheet data from either...
From Excel 2003, you could use Tables. A cDataSet is somewhat like a table in that is structured data, expecting headings etc. When you use bigCommit() in cDataSet, it wipes out the existing Excel data and replaces it with the values you have changed....
Nowadays structured references are the preferred way to access table data in Excel and VBA. Although most of the examples you may have looked at so far have talked about ranges, you can also specify table references to cDataSet - this allows you...
Using promises in JavaScript and other languages is the preferred way to orchestrate the completion of asynchronous activities. Here’s a (not perfect but fun) Promise implementation in VBA. Example includes getting data from Google Fusion tables.
In Promises in VBA I introduced how to use promises in VBA to orchestrate asynchronous activities. One of the things that you can do in VBA asynchronously is to get data from a workbook or a database using ADO . It's very complex to orchestrate and e...
Here's where it gets really interesting. Let's say that we need to get some large number of spreadsheets from Google Docs. We want to do it asynchronously, and we also know that google docs will fail if it receives to many requests, or it's too busy....
I posted something on how to do exponential backoff using jQuery promises a while ago. At the time, I never thought I would be implementing that in VBA because of all the asynchroncity and callbacks needed, but since implementing a basic promises for ...
You can use the Windows API to call setTimer() to do something a little like setTimeout in javaScript. However there are some serious gymnastics to be able to have multiple timers going at the same time. This is because setTimer can only callback a regular...
Here's how the promise framework is implemented. This is kind of extreme VBA and Excel is very unforgiving. If you are playing around with this, I advise saving often.
cDeferred versus cPromise
These two classes tend to be used interchangeably in ...
An experimental implementation of deferred classes to enable asynchronicity in Excel