获取Excel撤消堆栈语言独立 [英] getting Excel undo Stack language independent

查看:89
本文介绍了获取Excel撤消堆栈语言独立的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们在代码中依赖于LastUseraction of Excel。 LastUseraction我们从CommandBarcontrol获取它。

We are dependent on LastUseraction of Excel in our code. LastUseraction we are getting it from the CommandBarcontrol.

喜欢这个。

变种的 userAction = commandControl.List [1];

var userAction = commandControl.List[1];

根据LastUserAction(例: - 类别,小计,枢轴,透视刷新我们正在决定一个特定的动作。所以当ExcelApplication是英文时,它工作正常。但是一旦用户更改语言,我们的Addin就无法按预期工作,因为LastUserAction
不是英文版。

Based on LastUserAction(Ex:-Sort,SubTotals,Pivot,PivotTable Refresh) we are deciding a particular action.So when ExcelApplication is in English it works fine.But once User change the Language our Addin did not work as expected because the LastUserAction does not come in English.

所以有任何选项让UndoStack独立于语言或任何其他替代方法。

So is there any option to get the UndoStack independent of Language or any other alternate approach.

推荐答案

Hi,

您可以使用
Application.LanguageSettings Property (Excel)
获取语言。

你可以检查
MsoAppLanguageID Enumeration(Office)
返回其安装语言或UI语言或其他语言。要查看返回的ID,请访问
MsoLanguageID Enumeration

You could check MsoAppLanguageID Enumeration (Office) to return its installation language or UI language or others. To check the returned Id, please visit MsoLanguageID Enumeration

问候,

Celeste


这篇关于获取Excel撤消堆栈语言独立的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆