> 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.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.> 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.