Thread

Posted on Thu May 12 19:33:44 2005 by marfolarfo
Excel dropping core on charts generated with todays dataset.
I developed a tool that creates any of three worksheets, based on the data in a file,and then a chartsheet for each. Everything was going smoothly until today when I tried to run todays new data and excel dropped core. I narrowed it down to two of the three chartsheets, if generated, cause it to do this. I can still run the old data files and they work just fine. This data file has no surprises in it. The charts all use the same formats. Any ideas on how to figure out what is going on here.
Direct Responses: 451 | Write a response
Posted on Thu May 12 21:06:38 2005 by jmcnamara in response to 450
Re: Excel dropping core on charts generated with todays dataset.

> Everything was going smoothly until today when I tried to run todays new data and excel dropped core.

I don't know of anything that might cause this. Can you send me the Excel file and the program that you used to produce it.

John.
--
Direct Responses: 452 | Write a response
Posted on Thu May 12 23:38:49 2005 by marfolarfo in response to 451
Re: Excel dropping core on charts generated with todays dataset.
I sent it.
Direct Responses: 454 | Write a response
Posted on Fri May 13 02:55:11 2005 by jmcnamara in response to 452
Re: Excel dropping core on charts generated with todays dataset.

I had a look at the files and program that your sent. The problem occurs due to a mismatch between the location that the chart expects the data to be in and the actual worksheet locations. I'll try to explain the mechanism behind this so that the problem is a little clearer.

Consider a workbook with 4 charts (Chart1 .. Chart4) that link to data in 4 worksheets (Sheet1 .. Sheet4). Each chart will contain an index number for the worksheet that contains its data (1 .. 4). These indices are hardcoded into the binary chart objects that you extract using the chartex tool. The methodology for recreating the links in WriteExcel is to specify a dummy formula using store_formula().

However, if you omit one of these links or worksheets in the workbook then one or more of the charts will end up with a reference to a worksheet that doesn't exist or to the wrong worksheet. And this will cause Excel to crash (or at best load in repair mode).

The solution to this is to create the worksheets in the same order as in the template file and to specify the links in the same order using the store_formula() calls suggested by chartex. In addition you should omit any formulas in the template file and create the charts in the order that you want them in the target file.

This is very inflexible but it is necessary for now until I can finish working on other features and get enough time to move chart support from experimental to usable.

John.
--
Direct Responses: 461 | Write a response
Posted on Mon May 16 23:04:06 2005 by marfolarfo in response to 454
Re: Excel dropping core on charts generated with todays dataset.
You made the statement: "The solution to this is to create the worksheets in the same order as in the template file and to +specify the links in the same order using the store_formula() calls suggested by chartex. In addit +ion you should omit any formulas in the template file and create the charts in the order that you +want them in the target file." I tried this. I created the worksheets in the exact order that I would use them. I did drag the tab +s around, after I was finished, to make it look like what I think it should look like. It still do +esn't work. You also said: However, if you omit one of these links or worksheets in the workbook then one or more of the chart +s will end up with a reference to a worksheet that doesn't exist or to the wrong worksheet. And th +is will cause Excel to crash (or at best load in repair mode). Does this mean that I have to have all the worksheets and chartsheets everytime I create a workbook +?
Direct Responses: 463 | Write a response
Posted on Tue May 17 00:35:44 2005 by jmcnamara in response to 461
Re: Excel dropping core on charts generated with todays dataset.

> I tried this. ... It still doesn't work.

Send me a example program like before and I'll have a look at it.

> Does this mean that I have to have all the worksheets and chartsheets everytime I create a workbook?

Currently, yes.

John.
--
Direct Responses: 467 | Write a response
Posted on Tue May 17 18:17:43 2005 by marfolarfo in response to 463
Re: Excel dropping core on charts generated with todays dataset.
Thanks John, By creating dummy worksheets and chartsheets for the ones I really don't need, I was able to get it to work.
Write a response