+ Reply to Thread
Results 1 to 2 of 2

changing chart data generates error!

  1. #1
    Registered User
    Join Date
    11-04-2004
    Posts
    2

    changing chart data generates error!

    What I'm doing is admittedly a bit unusual, but I'm so close to the desired result that I can't help thinking there's a way to accomplish what I'm trying to do. Here's the details:

    I've created a very bland Excel chart which is essentially what you'd get if you selected a range of data, did an Insert->Chart, then hit 'Finish'. All values are the default.

    Next, an external source changes the data, but not simply by updating the values in cells or changing the range, it deletes some number of rows or columns within the range referenced by the chart and re-inserts new cells in the same shape which it then populates with data.

    The problem occurs because within the chart, Excel has generated formulas that define data series, chart legends, etc. and when the cells within that range are deleted, it results in Excel throwing an error indicating that the sheet contains bad formulas.

    When the change occurs I detect that the chart has 'gone bad' and update its data - that part works fine. What I can't seem to do is prevent the annoying error box from appearing before I've fixed the chart. Even worse, at seemingly arbitrary times that I can't figure out, when the error occurs, Excel swap the chart axis (the 'plotby' attribute) so that when I do repair the chart (after the error message) it's changed axes.

    All I really need is a way to prevent the error from occuring. I know that the chart is bad, I'm about to fix it, but Excel jumps the gun and throws the error before it hits any error handlers that I create.

    You can reproduce most of this behavior manually; create a chart with 4 rows and 4 columns including labels, graph it (embedded graph), then select the interior (middle) row and delete it, shifting the rows up. The graph turns funny, the legends associated with the middle element become #REF and you'll see the cursed error that I'm talking about. In fact, you'll keep seeing it if you bring up the Source Data box from the chart and just change from the Data Range to the Series tab, then move the box around the screen a few times.

    As always, thanks in advance for any info you folks can provide.

    - Rob

  2. #2
    Registered User
    Join Date
    11-04-2004
    Posts
    2
    Anyone? C'mon... don't be shy!

    Seriously though, any thoughts would be very much appreciated.

    - Rob

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1