DPlot Forum Index DPlot
http://www.dplot.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Excel Worksheet Name (Worksheet Tab) as Title

 
Post new topic   Reply to topic    DPlot Forum Index -> Excel
View previous topic :: View next topic  
Author Message
jsc



Joined: 02 Dec 2005
Posts: 222

PostPosted: Fri Feb 24, 2006 9:32 pm    Post subject: Excel Worksheet Name (Worksheet Tab) as Title Reply with quote

Two questions, but with similar intent.

Is there a way to have the worksheet tab name show up in on of the title lines? For example, a normal DDE exchange seems to grab the Worksheet filename as Title1, so is it possible to have the Tab name grabbed as Title2?

Another possibility I'd like to have, is there a way to force a title when selecting a block of data in the Excel worksheet? For example, with an intent of selecting a block of data for an XYXY or XYYY plot, if the upper left cell contained a text string, could it be assigned the Title2 text? (I'll assume you always might want Title1 text to be the Worksheet filename.)

What I'm getting at is that I have a worksheet with data from multiple tests. The tests are all on their own tabs, and all the tabs have a descriptive name. Normally, if I were to select any one of the tabs, then select data for a DDE initiated plot, DPlot would always grab the same worksheet filename as the Title1 text. Then I would always have to manually revise the Title1 text, or manually add the Title2 text.

I can see many opinions regarding how this can/should work, but this would be worth thinking about, I believe (my opinion!!).

Thanks for your consideration.

Jon
Back to top
View user's profile Send private message
DPlotAdmin
Site Admin


Joined: 24 Jun 2003
Posts: 2310
Location: Vicksburg, Mississippi

PostPosted: Sat Feb 25, 2006 12:50 am    Post subject: Reply with quote

Quote:
Is there a way to have the worksheet tab name show up in on of the title lines? For example, a normal DDE exchange seems to grab the Worksheet filename as Title1, so is it possible to have the Tab name grabbed as Title2?


Sure, and that's a good idea. I'll add that next time. Or if you're feeling adventurous you can do this yourself right now:


  1. Select Tools>Macro>Visual Basic Editor.
  2. Click the + symbol next to DPlotLib (dplotlib.xla).
  3. Enter password 'dplot'.
  4. Click the + symbol next to Modules, then double-click DPlotData.
  5. Search for all lines "D.Title1 = ActiveWorkbook.Name" and on the next line add "D.Title2 = ActiveSheet.Name" (without the quotation marks)
  6. Click the Save button.
  7. If things go completely wrong don't worry - you have an original copy of dplotlib.xla in the \addin folder below dplot.exe.


Quote:
Another possibility I'd like to have, is there a way to force a title when selecting a block of data in the Excel worksheet? For example, with an intent of selecting a block of data for an XYXY or XYYY plot, if the upper left cell contained a text string, could it be assigned the Title2 text? (I'll assume you always might want Title1 text to be the Worksheet filename.)


Right now if the first row is text then those cells are used for the axis labels and/or legend. I could change this, or rather add to it, such that if the first two rows were text then the first row would be used for the title and the 2nd row would be used as it is now. But that overrides your previous suggestion... I could make this the 3rd title line if that will suit your needs.
_________________
Visualize Your Data
support@dplot.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
jsc



Joined: 02 Dec 2005
Posts: 222

PostPosted: Sat Feb 25, 2006 8:38 am    Post subject: Reply with quote

David,

Thanks for the reply. As for option 1, I did look through the help file and found where I could modify dplotlib.xla, and was going to take a stab at doing that, but thanks for the specific instructions - I would have fumbled with it.

As for option 2, the extra line as Title3, you might want a few more comments before implementing something like that. I can see more opinions on how it should be done, and to do it this way might bring some complaints. (Of course, that's one way to get some immediate feedback!!)

I'll go for option 1 now - it will satisfy my needs for the current project.

As always, thank you very much for your help.

Jon
Back to top
View user's profile Send private message
jsc



Joined: 02 Dec 2005
Posts: 222

PostPosted: Sun Feb 26, 2006 2:39 pm    Post subject: Reply with quote

David,

I see where you added the Title2 statement to the new dplotlib.xla in 2.040, but it is not working for me. I've tried it in workbooks with names like "Sheet1", as well as more descriptive names - DPlot does not seem to pick up the tab name and place it as Title2. Is there something else that has to happen?

Jon
Back to top
View user's profile Send private message
DPlotAdmin
Site Admin


Joined: 24 Jun 2003
Posts: 2310
Location: Vicksburg, Mississippi

PostPosted: Sun Feb 26, 2006 4:34 pm    Post subject: Reply with quote

Jon,
Works fine for me. It does nothing if you're appending data to an existing plot (which is intentional). If that's not the problem and you were running Excel at the time of the installation then the updated dplotlib.xla would not have been installed. And if you got the update via Check for Updates then everything is done silently, so you would not have seen any error messages.

You should be able to fix things manually, though:
Start Excel, select Tools>Add-Ins and uncheck "DPlot Interface". Click OK.
Exit Excel.
In Explorer look in the \addin folder below dplot.exe. You should have a dplotlib.xla dated Feb-26. Right-click and select Copy.
Move to c:\Documents and Settings\<username>\Application Data\Microsoft\Addins, right-click and select Paste.
Start Excel, select Tools>Add-Ins, check the "DPlot Interface" box, then click OK.

And if that doesn't help, which function are you using?
_________________
Visualize Your Data
support@dplot.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
jsc



Joined: 02 Dec 2005
Posts: 222

PostPosted: Sun Feb 26, 2006 8:08 pm    Post subject: Reply with quote

David,

Dplotlib.xla is installed correctly in the C:\Documents and Settings\<username>\Application Data\Microsoft\AddIns\" subdirectory. I had noticed the date change, so used your earlier instructions to open the xla and look to see if it was added. I saw that it was, so exited, and quit Excel. Then I opened a spreadsheet with some data in named tabs, selected data, asked for an XYYY plot in the DPlot menu. DPlot opened, drew the curves, but there was no Title2 text. I checked the Text>Titles/Axes, and there was no indication there, either. I tried this several times, with several different spreadsheet, and never got it to work.

This is with Office 2000 on WinXP Home/sp2.
Back to top
View user's profile Send private message
DPlotAdmin
Site Admin


Joined: 24 Jun 2003
Posts: 2310
Location: Vicksburg, Mississippi

PostPosted: Sun Feb 26, 2006 9:04 pm    Post subject: Reply with quote

Just to make sure there's not something strange in your worksheet (strange in this case being some Excel feature that I'm unaware of), try opening examples.xls in the folder where dplot.exe is located. Try the XYYY example there (on the sheet labelled XYYY). Do you not get the second title line=XYYY?
_________________
Visualize Your Data
support@dplot.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
jsc



Joined: 02 Dec 2005
Posts: 222

PostPosted: Sun Feb 26, 2006 9:13 pm    Post subject: Reply with quote

Think I found out what was going on - "sticky" xla's. Looks like you have to be REAL careful of stray dplotlib.xla's around. Even renaming the old xla file - and after I thought I had "disconnected" it by turning off the DPlot add-in, Excel was still finding the old xla's. I had even quit Excel, renamed the file to "Copy of dplotlib.xla", and then later to dplotlib.xl_ and even deleting the old xla, somehow, I kept picking up the old version. With Excel shut down, even renaming the file and changing the extension in explorer, Excel seemed to keep picking up the old version just because it was in the subdirectory.

I think I have it working now. Thank you very much! (Boy, are you working late tonight, too!)
Back to top
View user's profile Send private message
DPlotAdmin
Site Admin


Joined: 24 Jun 2003
Posts: 2310
Location: Vicksburg, Mississippi

PostPosted: Sun Feb 26, 2006 9:21 pm    Post subject: Reply with quote

Thanks for the info. Unfortunately I don't know as much about this stuff as I should, but I'm learning.
_________________
Visualize Your Data
support@dplot.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    DPlot Forum Index -> Excel All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group