Navigation:  Transferring data >

Using the DPlot Interface Add-In for Microsoft Excel

JR   Viewer

Print this Topic Previous pageReturn to chapter overviewNext page

If you elected to install the DPlot Interface add-in when you installed DPlot, you should see a "DPlot" menu entry in Microsoft Excel 2003 and previous versions:

In Excel 2007, if you select the Add-Ins tab then you should see a DPlot entry at the left of the screen under the Home tab:

In either case, if you do not see something similar to the above then either 1) you did not install the optional Add-In when you installed DPlot, 2) the Add-In actually was installed but a security setting in Excel has hidden it, or 3) a user with an account different than your own (most likely an administrator) installed DPlot for you. If you did not install the Add-In you can do so simply by re-installing DPlot to the same folder where it currently exists (the default is c:\Program Files\DPlot), this time making sure to check the "MS Excel Add-In" box. You will need to exit DPlot before re-installing.

If you did install the Add-In but do not see a DPlot menu in Excel:

In Excel 2003 and previous verions

Select "Add-Ins" on the Tools menu:

There should be a "DPlot Interface" box:

Check that box, then click OK. If there is not a "DPlot Interface" box, then most likely DPlot was installed by a different user than you, probably an administrator because you have a limited-privileges user account. In that case click the "Browse" button and navigate to the folder where DPlot was installed (default location=c:\Program Files\DPlot). Select the file dplotlib.xla then click OK.

In Excel 2007

Click the Office button in the upper left corner:

On the resulting screen click "Excel Options" at the bottom of the window.

Click "Add-Ins" in the left pane.

At the bottom of the next screen, ensure that the "Manage" selection is "Excel Add-Ins" then click "Go"

The next dialog is identical to that for Excel 2003 shown above. Check the "DPlot Interface" box (or follow the instructions above if that box is not present), then click OK.

 

If you properly installed the Add-In but now when starting Excel 2003 or previous versions you see an error message complaining about Run-time error '438', the most likely cause is some previous operation that has, for whatever reason, caused Excel's toolbar to temporarily lose its mind. You can correct this problem with the following steps:

Start Excel. Select Tools>Customize. Click the Toolbars tab.
Near the end of the Toolbars list, find Worksheet Menu Bar. Select that entry so that it is highlighted.
Click the Reset button. When asked whether you really want to do this, click OK.
Click the Close button, then exit and restart Excel.
If you previously deactivated the DPlot Add-In to get rid of this error message, select Tools>Addins, check the DPlot Interface box, then click OK.

To use the Add-In, start Microsoft Excel and open the worksheet containing the data you'd like to plot in DPlot. If you are unfamiliar with the Add-In you will find the example Excel spreadsheet EXAMPLES.XLS useful. This sheet includes examples for all of the functions in the Add-In. EXAMPLES.XLS is installed to the DPlot folder (if you used the default installation options that will be c:\Program Files\DPlot) and is also stored on the DPlot web site. (The links here to EXAMPLES.XLS may or may not open the file in Excel, depending on which service pack of the particular version of Windows you are using.)

The Add-In contains functions that allow you to pass data from Excel to DPlot, producing any type of plot that DPlot currently supports.

Key Add-In features:

For all functions other than ZGrid (see below), you may use multiple selections if your data columns are not adjacent. This differs from using Copy/Paste, which results in copying ALL values within the extents of all selections.
Data is passed as floating point numbers and internally is independent of the formatting. With Copy/Paste, data is passed as text, exactly as it appears in your worksheet. If you only show 2 decimal places then the data is truncated to 2 decimal places in DPlot.
Blank cells are interpreted as you'd expect.
All functions other than OneD attempt to use the same formatting in DPlot that is used in Excel (dates, for example).

Add-In Functions

XYXY
Select alternating X,Y columns and produce an XY plot. Column selections may have differing numbers of rows.

XYYY
Same as above, but X is taken from the first selected column and all subsequently-selected columns are Y values for separate curves. If only one column is selected, it is assumed to be Y values and X is generated, starting at 0 and incremented by 1. Y columns may have blank cells.

X,Y,Label

Creates 1 curve on an XY plot with X is taken from the first selected column, Y taken from the second selected column, and text labels in the third column. Label cells may be blank.

Bar chart

Creates a bar chart with non-numeric labels on the X axis and 1 or more groups of amplitudes.

Bar chart, data in rows

Same as Bar chart command, with data sets in the same row rather than the same column.

OneCurvePerRow
Similar to XYXY, but data is arranged by rows rather than columns, with alternating X and Y values in adjacent columns. Each row is used to produce one curve.

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.

OneD
Select one or more columns of amplitudes and produce a box-and-whisker plot.

Editing the Add-In

The Visual Basic for Applications (VBA) routines in DPLOTLIB.XLA are protected against editing, mainly to avoid confusion with other VBA functions you might create. If you are comfortable with VBA and would like to experiment with the add-in's features:

1)We strongly suggest that you first make a backup copy of the .XLA file. In Office 2000 and later versions, DPLOTLIB.XLA can be found in the \Microsoft\Addins folder below the Application Data folder. For earlier versions of Excel DPLOTLIB.XLA will be stored in the \Library folder below EXCEL.EXE. Save the backup copy of the Add-In to a different folder so that you won't become confused on Excel's Add-In's dialog.
2)Unload the Add-In: Select Tools>Add-Ins and uncheck "DPlot Interface".
3)Select Tools>Macro>Security. On the Security Level tab, ensure that "Low" is checked. Don't be concerned about changing your security level; this is only a temporary change that will enable you to edit and run VBA functions.
4)Open the Add-In file (DPLOTLIB.XLA, see above for the location of this file) using File>Open.
5)Select Tools>Macro>Visual Basic Editor:

In the Project Explorer window, click on the + symbol next to DPlotLib (dplotlib.xla):

If you do not see the Project Explorer window, select Project Explorer on the View menu. After clicking on the + symbol next to DPlotLib (dplotlib.xla) you will be prompted for a password. Enter "dplot" in all lowercase letters (without the quotation marks).

6)The functions under Microsoft Excel Objects (This Workbook) simply create the DPlot menu and delete the menu if/when the add-in is unloaded. The meat of the add-in is under Modules in DPlotData. For more information on DPLOTLIB functions see the DPLOTLIB documentation at http://www.dplot.com/lib/index.htm
7)After making any changes, save your work, exit the VBA editor, reset your security level if necessary, and re-load the add-in using Tools>Add-Ins.

 


Page url: http://www.dplot.com/help/index.htm?helpid_addin.htm