What can you learn here?
- Using ramblings libraries
- Short code snippets
- Abbreviated explanations
Complex stuff in a few lines of code get it now
This section is going to cover how to do complex stuff in just a few lines, mainly using the classes and modules you can find in the cDataSet.xlsm (or the Google Apps Version), which you can download here. In many cases you may not actually be using these classes, just leveraging some of their inbuilt properties and methods. They probably wont be exactly ‘one liners’, but pretty close.
References
You may need some additional VBA references, all of which are defined in the cDataSet.xlsm file. If you use that, all the references are already defined.
cDataSet class
This class abstracts data from its physical location and lays a common object model over Excel and Google Apps Script to allow for easy migration. See How to use cDataSet to get started.
Clear data cells with cDataSet
Coloring maps and other shapes
Create a list of unique values
Excel to Json and output to file
General copy and filter worksheet
Getting data out of scraperWiki
Make a copy of a sheet and respect autofilter
Make a copy of a worksheet
Make a copy of some of the columns in a worksheet
Make a filtered copy of a worksheet
cJobject class
This class is used to make javaScript like objects available in VBA, and to convert stuff to and from jSon. See How to use cJobject for more information and is available in both VBA and Google Apps Script
- Passing complex arguments in VBA – copy how its done in javaScript
- Getting data out of scraperWiki
- Excel to Json and output to file
cRest class
This class is used in the Rest to Excel library in order to query REST APIs and decode the responses. There is both a VBA version and a Google Apps Script version
cPersistence class
This class is used to store data from user forms in a hidden shape to make it persistent from one use to the next.
Take a look at Get Started Snippets for more tips like this. In the meantime why not join our forum, follow the blog or follow me on twitter to ensure you get updates when they are available.