UKC

Geeky Excel questions - charts

New Topic
This topic has been archived, and won't accept reply postings.
 LastBoyScout 09 Apr 2019

Hi,

I have an old piece of software that builds a file of data that it then throws at Excel to display as either a pie chart or bar graph, complete with headings and so on.

It doesn't work - gives a runtime error '1004' with the message "the default chart type cannot be applied to the selected data", but 1004 isn't specific enough to determine the exact cause.

This must have worked at some point in the past, but I don't have any documentation about it from my company, or even any comments in the code. I'm struggling to find anything relevant to doing this from outside Excel - there's plenty about how to do it within Excel. I expect the problem is either the command line, or the file format, or both, need updating - it would have originally been written against a much older version of Excel.

Can anyone point me in the right direction, please?

 AndyC 09 Apr 2019
In reply to LastBoyScout:

If it's a standalone application, it's probably using DDE to manipulate Excel. It's possible that the DDE commands it's sending are obsolete in the new version of Excel. Then you will probably not be able to fix it.

However, one possibility, given the error says 'the default chart type...', is to change the default chart type in your Excel installation to something more suitable and see if that helps.  This page shows you how to do it...

https://www.officetooltips.com/excel_2016/tips/how_to_change_default_chart....

Post edited at 15:37
OP LastBoyScout 09 Apr 2019
In reply to AndyC:

It's definitely not using DDE for this. One bit of software is spitting out a file of data that Excel is supposed to display in visual format - a bit like exporting a CSV file and displaying that in Excel.

Thanks for the other tip, though.


New Topic
This topic has been archived, and won't accept reply postings.
Loading Notifications...