in reply to Win32:OLE -> difference between English and German Excel

The Object Browser in Excel yields, The UILanguage property of the Excel.Application object as the possible solution here. When I looked for help on it.. it says it's not relevant to US English versions of Excel .. which makes me think this is what you're looking for. So based on the value of that... have a statement akin to...

my $h = ($xl->{UILanguage} eq 'German' ? 'Z':'R'); my $v = ($xl->{UILanguage} eq 'German' ? 'S':'C');
H and V standing for horizontal and vertical.. keeping it neutral to the actual words for row and column in german and english.


Grygonos

Replies are listed 'Best First'.
Re^2: Win32:OLE -> difference between English and German Excel
by Streen (Sexton) on Jul 01, 2004 at 07:53 UTC
    Hi,
    I tried this, but it doesn't work. Something I found was the XlApplicationInternational which should store the constant xlUpperCaseColumnLetter which is different for each country, but I didn't manage it to get the value of this Constant.
    I tried several codes but none of them will function, maybe you can help?
    #my $V = $Excel->International->{xlUpperCaseColumnLetter}; my $lang = $V->XlApplicationInternational->{xlUpperCaseColumnLetter}; print "Column letter: $V\n";

      Below code is tested and verified on ActiveState 5.8.0 with Excel 97'

      #!/Perl/bin/perl use strict; use warnings; use Win32::OLE; use Win32::OLE::Const; my $xl = Win32::OLE->new('Excel.Application'); my $xlConst = Win32::OLE::Const->Load('Microsoft Excel 8.0 Object Libr +ary'); print $xl->International($$xlConst{'xlUpperCaseColumnLetter'}); print $xl->International($$xlConst{'xlUpperCaseRowLetter'});