Ich kann die Excel-Anwendungsversion des Servers abrufen:
Code: Select all
xApp = new Microsoft.Office.Interop.Excel.Application();
// getting version of Server's Excel Application
string versionName = xApp.Version;
int length = versionName.IndexOf('.');
versionName = versionName.Substring(0, length);
object missing = Type.Missing;
object trueObject = true;
xApp.Visible = false;
xApp.DisplayAlerts = false;
xWorkBook =
xApp.Workbooks.Open(ExcelFilePath, missing, trueObject,
missing, missing, missing,
missing, missing, missing,
missing, missing, missing, missing, missing, missing);
Im aktuellen Fall gibt versionName 14.0 zurück, was für Office 2010 gilt.
Mobile version