New Excel examples

VBA and general Excel Q&A and examples
Post Reply
User avatar
DPlotAdmin
Posts: 2312
Joined: Tue Jun 24, 2003 9:34 pm
Location: Vicksburg, Mississippi
Contact:

New Excel examples

Post by DPlotAdmin »

There is a new group of VBA utility functions for Excel available here: [Update: This download has been removed in favor of the Add-In now distributed with DPlot]. Download this file and unzip to the folder of your choice. The file includes dplotlib.dll and 2 Excel .xls files: examples.xls contains several practical examples of the use of the functions in dplotlib.xls. Open both files in Excel. Dplotlib.xls creates a new menu in Excel that hooks to these VBA functions:

XYXY
Select alternating X,Y columns and produce an XY plot. Use multiple selections if columns aren't adjacent. Selections may have differing numbers of rows.

XYYY
Same as above, but X is taken from the 1st column in the selection and all subsequent columns are Y values for separate curves. Y columns may have blank cells.

XYZSurface
Select an X, a Y, and a Z column (one or more selections). Produce a 3D surface plot.

XYZScatter
Select one or more groups of X,Y,Z columns and produce a 3D scatter plot, one data set per X,Y,Z group.

ZGrid
Select a table with X in the first row, Y in the first column, and the remainder of the table filled with Z values for the corresponding X and Y. Produces a 3D surface plot.

There are several advantages to these routines over Copy/Paste with the current version of DPlot:
  • Data is passed as floating point numbers and internally is independent of the formatting. With Copy/Paste, if you only show 2 decimal places then the data is truncated to 2 decimal places in DPlot. Also, Copy/Paste does not allow (currently) dates, times, currencies, etc.
  • Non-adjacent columns. Currently with Copy/Paste, Excel copies ALL data contained within the extents of all selections, even if it isn't selected.
  • Blank cells are interpreted as you'd expect.
  • The VBA routines take a stab at using the same formatting in DPlot that is used in Excel (dates, for example). At the moment this feature is pretty basic and will most likely be improved upon.
You're of course welcome to take a look at the VBA routines in dplotlib.xls and offer suggestions for new features or improvements if you have any.

After a few rounds of comments/suggestions I'll most likely convert dplotlib.xls to an add-in so that you won't need to remember to load it along with your working spreadsheet. You can do the conversion yourself; if you do so be sure to also copy dplotlib.dll to the folder where the dplotlib.xla add-in is saved.

Questions? Problems? Suggestions? Let's hear 'em.
Visualize Your Data
support@dplot.com
Ian
Posts: 15
Joined: Tue Mar 30, 2004 2:25 pm
Location: Nottingham, UK

Post by Ian »

Highly impressive... I find the Torus one the most amazing though, considering my indepth love of the Joint European Torus project http://www.jet.efda.org/!!
Post Reply