arjkou has asked for the wisdom of the Perl Monks concerning the following question:

Hi, I'm trying to plot multiple graphs (each one in a different sheet) from the data that is in another sheet. The range selected for each of the graphs is different. The problem that i am facing is this - For the first graph (say a bar chart), the variable to which the range is being assigned is having a valid value. For the second graph (say a bar chart), the variable to which the range is being assigned is having not having any value. Note that the ranges taken for the graphs are from the same sheet but the graphs need to be plotted in different sheets. Please provide a solution for this ASAP.
  • Comment on Plotting multiple graphs in excel using win32::OLE

Replies are listed 'Best First'.
Re: Plotting multiple graphs in excel using win32::OLE
by Gangabass (Vicar) on Aug 06, 2009 at 08:27 UTC

    Please show your code first so we can help you.

Re: Plotting multiple graphs in excel using win32::OLE
by rovf (Priest) on Aug 06, 2009 at 07:46 UTC
    For the second graph (say a bar chart), the variable to which the range is being assigned is having not having any value.

    Just for terminology: range in this context means the same as with mathematical functions; so if you have a bar chart, the range denotes the minimum and maximum height of the bars. Is this correct?

    In this case, if you have no range given, I would derive the range in some reasonable way from the data itself. For the upper bound of the range, you could simply take the largest value to plot. For the lower bound of the range, I would not take the smallest value (because this would result in a bar of height zero), but something smaller. If the values are all non-negative, you could try 0 as a lower range or, if this makes the bars look "too equal-sized", you could take 80% of the lowest value for the lower bound of the range. See also David Huff's book "How to Lie With Statistics" ;-)
    -- 
    Ronald Fischer <ynnor@mm.st>
Re: Plotting multiple graphs in excel using win32::OLE
by jrsimmon (Hermit) on Aug 06, 2009 at 15:09 UTC

    Hello arjkou, and welcome. Please take a minute to read How do I post a question effectively? and How (Not) To Ask A Question. These nodes will help you to ask your question in a more effective manner.

    It would also be wise to consider that you are asking for help, not delegating a task to a subordinate. A less demanding tone would likely yield a larger set of useful responses.

Re: Plotting multiple graphs in excel using win32::OLE
by FloydATC (Deacon) on Aug 06, 2009 at 13:20 UTC
    Let me see if I understand the problem; you are sending different data sets for each graph but you want the graphs to be comparable, so e.g. the value 10 in one graph should produce a bar twice as tall as the value 5 in the next graph?

    -- Time flies when you don't know what you're doing