View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Roger Dunn Roger Dunn is offline
external usenet poster
 
Posts: 1
Default I've asked this before...(x-axis day of week)

A repost from a few months ago...

I am exporting data into Excel via Automation using C++.
When I invoke the function below for a chart...

Axis axisX = chart.Axes(COleVariant((short)xlCategory), xlPrimary);
TickLabels tickLabels = axisX.GetTickLabels();
// set x-axis label to show 'Sun' 'Mon' 'Tue' etc.
tickLabels.SetNumberFormat("ddd");

It works ok for English and some other countries, but does not work in
German or French. Excel complains with an error dialog.

It works ok in German if the string becomes "TTT", in French it is ok
if it is "jjj". However, it seems to be quite a pain to figure out what
all of these strings should be for each country. Is there a better way
to do this than creating my own table and looking up the country codes?

Where do these actual strings live ? Anyway to retrieve them programmatically?