ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   I've asked this before...(x-axis day of week) (https://www.excelbanter.com/excel-programming/277813-ive-asked-before-x-axis-day-week.html)

Roger Dunn

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?


All times are GMT +1. The time now is 06:01 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com