/ExcelDna-0.29/Source/ExcelDna.Integration/XlCall.cs

http://github.com/b1g3ar5/Sharpener · C# · 1096 lines · 1021 code · 19 blank · 56 comment · 2 complexity · f274ba8cf7c47601801bd19bdc8840bb MD5 · raw file

  1. /*
  2. Copyright (C) 2005-2011 Govert van Drimmelen
  3. This software is provided 'as-is', without any express or implied
  4. warranty. In no event will the authors be held liable for any damages
  5. arising from the use of this software.
  6. Permission is granted to anyone to use this software for any purpose,
  7. including commercial applications, and to alter it and redistribute it
  8. freely, subject to the following restrictions:
  9. 1. The origin of this software must not be misrepresented; you must not
  10. claim that you wrote the original software. If you use this software
  11. in a product, an acknowledgment in the product documentation would be
  12. appreciated but is not required.
  13. 2. Altered source versions must be plainly marked as such, and must not be
  14. misrepresented as being the original software.
  15. 3. This notice may not be removed or altered from any source distribution.
  16. Govert van Drimmelen
  17. govert@icon.co.za
  18. */
  19. using System;
  20. using System.Collections.Generic;
  21. using System.Diagnostics;
  22. using System.Text;
  23. using System.Reflection;
  24. using System.Runtime.InteropServices;
  25. namespace ExcelDna.Integration
  26. {
  27. public class XlCall
  28. {
  29. /*
  30. ** Return codes
  31. **
  32. ** These values can be returned from Excel4() or Excel4v().
  33. */
  34. public enum XlReturn
  35. {
  36. XlReturnSuccess = 0, /* success */
  37. XlReturnAbort = 1, /* macro halted */
  38. XlReturnInvXlfn = 2, /* invalid function number */
  39. XlReturnInvCount = 4, /* invalid number of arguments */
  40. XlReturnInvXloper = 8, /* invalid OPER structure */
  41. XlReturnStackOvfl = 16, /* stack overflow */
  42. XlReturnFailed = 32, /* command failed */
  43. XlReturnUncalced = 64, /* uncalced cell */
  44. XlReturnNotThreadSafe = 128, /* not allowed during multi-threaded calc */
  45. XlReturnInvAsynchronousContext = 256, /* invalid asynchronous function handle */
  46. XlReturnNotClusterSafe = 512 /* not supported on cluster */
  47. }
  48. /*
  49. ** Function number bits
  50. */
  51. public static readonly int xlCommand = 0x8000;
  52. public static readonly int xlSpecial = 0x4000;
  53. public static readonly int xlIntl = 0x2000;
  54. public static readonly int xlPrompt = 0x1000;
  55. /*
  56. ** XLL events
  57. **
  58. ** Passed in to an xlEventRegister call to register a corresponding event.
  59. */
  60. public static readonly int xleventCalculationEnded = 1; /* Fires at the end of calculation */
  61. public static readonly int xleventCalculationCanceled = 2; /* Fires when calculation is interrupted */
  62. /*
  63. ** Auxiliary function numbers
  64. **
  65. ** These functions are available only from the C API,
  66. ** not from the Excel macro language.
  67. */
  68. public static readonly int xlFree = (0 | xlSpecial);
  69. public static readonly int xlStack = (1 | xlSpecial);
  70. public static readonly int xlCoerce = (2 | xlSpecial);
  71. public static readonly int xlSet = (3 | xlSpecial);
  72. public static readonly int xlSheetId = (4 | xlSpecial);
  73. public static readonly int xlSheetNm = (5 | xlSpecial);
  74. public static readonly int xlAbort = (6 | xlSpecial);
  75. public static readonly int xlGetInst = (7 | xlSpecial); /* Returns application's hinstance as an integer value, supported on 32-bit platform only */
  76. public static readonly int xlGetHwnd = (8 | xlSpecial);
  77. public static readonly int xlGetName = (9 | xlSpecial);
  78. public static readonly int xlEnableXLMsgs = (10 | xlSpecial);
  79. public static readonly int xlDisableXLMsgs = (11 | xlSpecial);
  80. public static readonly int xlDefineBinaryName = (12 | xlSpecial);
  81. public static readonly int xlGetBinaryName = (13 | xlSpecial);
  82. public static readonly int xlAsyncReturn = (16 | xlSpecial); /* Set return value from an asynchronous function call */
  83. public static readonly int xlEventRegister = (17 | xlSpecial); /* Register an XLL event */
  84. public static readonly int xlRunningOnCluster = (18 | xlSpecial); /* Returns true if running on Compute Cluster */
  85. public static readonly int xlGetInstPtr = (19 | xlSpecial); /* Returns application's hinstance as a handle, supported on both 32-bit and 64-bit platforms */
  86. /* edit modes */
  87. public static readonly int xlModeReady = 0; // not in edit mode
  88. public static readonly int xlModeEnter = 1; // enter mode
  89. public static readonly int xlModeEdit = 2; // edit mode
  90. public static readonly int xlModePoint = 4; // point mode
  91. /* document(page) types */
  92. public static readonly int dtNil = 0x7f; // window is not a sheet, macro, chart or basic
  93. // OR window is not the selected window at idle state
  94. public static readonly int dtSheet = 0; // sheet
  95. public static readonly int dtProc = 1; // XLM macro
  96. public static readonly int dtChart = 2; // Chart
  97. public static readonly int dtBasic = 6; // VBA
  98. /*
  99. ** User defined function
  100. **
  101. ** First argument should be a function reference.
  102. */
  103. public static readonly int xlUDF = 255;
  104. /*
  105. ** Built-in Functions and Command Equivalents
  106. */
  107. // Excel function numbers
  108. public static readonly int xlfCount = 0;
  109. public static readonly int xlfIsna = 2;
  110. public static readonly int xlfIserror = 3;
  111. public static readonly int xlfSum = 4;
  112. public static readonly int xlfAverage = 5;
  113. public static readonly int xlfMin = 6;
  114. public static readonly int xlfMax = 7;
  115. public static readonly int xlfRow = 8;
  116. public static readonly int xlfColumn = 9;
  117. public static readonly int xlfNa = 10;
  118. public static readonly int xlfNpv = 11;
  119. public static readonly int xlfStdev = 12;
  120. public static readonly int xlfDollar = 13;
  121. public static readonly int xlfFixed = 14;
  122. public static readonly int xlfSin = 15;
  123. public static readonly int xlfCos = 16;
  124. public static readonly int xlfTan = 17;
  125. public static readonly int xlfAtan = 18;
  126. public static readonly int xlfPi = 19;
  127. public static readonly int xlfSqrt = 20;
  128. public static readonly int xlfExp = 21;
  129. public static readonly int xlfLn = 22;
  130. public static readonly int xlfLog10 = 23;
  131. public static readonly int xlfAbs = 24;
  132. public static readonly int xlfInt = 25;
  133. public static readonly int xlfSign = 26;
  134. public static readonly int xlfRound = 27;
  135. public static readonly int xlfLookup = 28;
  136. public static readonly int xlfIndex = 29;
  137. public static readonly int xlfRept = 30;
  138. public static readonly int xlfMid = 31;
  139. public static readonly int xlfLen = 32;
  140. public static readonly int xlfValue = 33;
  141. public static readonly int xlfTrue = 34;
  142. public static readonly int xlfFalse = 35;
  143. public static readonly int xlfAnd = 36;
  144. public static readonly int xlfOr = 37;
  145. public static readonly int xlfNot = 38;
  146. public static readonly int xlfMod = 39;
  147. public static readonly int xlfDcount = 40;
  148. public static readonly int xlfDsum = 41;
  149. public static readonly int xlfDaverage = 42;
  150. public static readonly int xlfDmin = 43;
  151. public static readonly int xlfDmax = 44;
  152. public static readonly int xlfDstdev = 45;
  153. public static readonly int xlfVar = 46;
  154. public static readonly int xlfDvar = 47;
  155. public static readonly int xlfText = 48;
  156. public static readonly int xlfLinest = 49;
  157. public static readonly int xlfTrend = 50;
  158. public static readonly int xlfLogest = 51;
  159. public static readonly int xlfGrowth = 52;
  160. public static readonly int xlfGoto = 53;
  161. public static readonly int xlfHalt = 54;
  162. public static readonly int xlfPv = 56;
  163. public static readonly int xlfFv = 57;
  164. public static readonly int xlfNper = 58;
  165. public static readonly int xlfPmt = 59;
  166. public static readonly int xlfRate = 60;
  167. public static readonly int xlfMirr = 61;
  168. public static readonly int xlfIrr = 62;
  169. public static readonly int xlfRand = 63;
  170. public static readonly int xlfMatch = 64;
  171. public static readonly int xlfDate = 65;
  172. public static readonly int xlfTime = 66;
  173. public static readonly int xlfDay = 67;
  174. public static readonly int xlfMonth = 68;
  175. public static readonly int xlfYear = 69;
  176. public static readonly int xlfWeekday = 70;
  177. public static readonly int xlfHour = 71;
  178. public static readonly int xlfMinute = 72;
  179. public static readonly int xlfSecond = 73;
  180. public static readonly int xlfNow = 74;
  181. public static readonly int xlfAreas = 75;
  182. public static readonly int xlfRows = 76;
  183. public static readonly int xlfColumns = 77;
  184. public static readonly int xlfOffset = 78;
  185. public static readonly int xlfAbsref = 79;
  186. public static readonly int xlfRelref = 80;
  187. public static readonly int xlfArgument = 81;
  188. public static readonly int xlfSearch = 82;
  189. public static readonly int xlfTranspose = 83;
  190. public static readonly int xlfError = 84;
  191. public static readonly int xlfStep = 85;
  192. public static readonly int xlfType = 86;
  193. public static readonly int xlfEcho = 87;
  194. public static readonly int xlfSetName = 88;
  195. public static readonly int xlfCaller = 89;
  196. public static readonly int xlfDeref = 90;
  197. public static readonly int xlfWindows = 91;
  198. public static readonly int xlfSeries = 92;
  199. public static readonly int xlfDocuments = 93;
  200. public static readonly int xlfActiveCell = 94;
  201. public static readonly int xlfSelection = 95;
  202. public static readonly int xlfResult = 96;
  203. public static readonly int xlfAtan2 = 97;
  204. public static readonly int xlfAsin = 98;
  205. public static readonly int xlfAcos = 99;
  206. public static readonly int xlfChoose = 100;
  207. public static readonly int xlfHlookup = 101;
  208. public static readonly int xlfVlookup = 102;
  209. public static readonly int xlfLinks = 103;
  210. public static readonly int xlfInput = 104;
  211. public static readonly int xlfIsref = 105;
  212. public static readonly int xlfGetFormula = 106;
  213. public static readonly int xlfGetName = 107;
  214. public static readonly int xlfSetValue = 108;
  215. public static readonly int xlfLog = 109;
  216. public static readonly int xlfExec = 110;
  217. public static readonly int xlfChar = 111;
  218. public static readonly int xlfLower = 112;
  219. public static readonly int xlfUpper = 113;
  220. public static readonly int xlfProper = 114;
  221. public static readonly int xlfLeft = 115;
  222. public static readonly int xlfRight = 116;
  223. public static readonly int xlfExact = 117;
  224. public static readonly int xlfTrim = 118;
  225. public static readonly int xlfReplace = 119;
  226. public static readonly int xlfSubstitute = 120;
  227. public static readonly int xlfCode = 121;
  228. public static readonly int xlfNames = 122;
  229. public static readonly int xlfDirectory = 123;
  230. public static readonly int xlfFind = 124;
  231. public static readonly int xlfCell = 125;
  232. public static readonly int xlfIserr = 126;
  233. public static readonly int xlfIstext = 127;
  234. public static readonly int xlfIsnumber = 128;
  235. public static readonly int xlfIsblank = 129;
  236. public static readonly int xlfT = 130;
  237. public static readonly int xlfN = 131;
  238. public static readonly int xlfFopen = 132;
  239. public static readonly int xlfFclose = 133;
  240. public static readonly int xlfFsize = 134;
  241. public static readonly int xlfFreadln = 135;
  242. public static readonly int xlfFread = 136;
  243. public static readonly int xlfFwriteln = 137;
  244. public static readonly int xlfFwrite = 138;
  245. public static readonly int xlfFpos = 139;
  246. public static readonly int xlfDatevalue = 140;
  247. public static readonly int xlfTimevalue = 141;
  248. public static readonly int xlfSln = 142;
  249. public static readonly int xlfSyd = 143;
  250. public static readonly int xlfDdb = 144;
  251. public static readonly int xlfGetDef = 145;
  252. public static readonly int xlfReftext = 146;
  253. public static readonly int xlfTextref = 147;
  254. public static readonly int xlfIndirect = 148;
  255. public static readonly int xlfRegister = 149;
  256. public static readonly int xlfCall = 150;
  257. public static readonly int xlfAddBar = 151;
  258. public static readonly int xlfAddMenu = 152;
  259. public static readonly int xlfAddCommand = 153;
  260. public static readonly int xlfEnableCommand = 154;
  261. public static readonly int xlfCheckCommand = 155;
  262. public static readonly int xlfRenameCommand = 156;
  263. public static readonly int xlfShowBar = 157;
  264. public static readonly int xlfDeleteMenu = 158;
  265. public static readonly int xlfDeleteCommand = 159;
  266. public static readonly int xlfGetChartItem = 160;
  267. public static readonly int xlfDialogBox = 161;
  268. public static readonly int xlfClean = 162;
  269. public static readonly int xlfMdeterm = 163;
  270. public static readonly int xlfMinverse = 164;
  271. public static readonly int xlfMmult = 165;
  272. public static readonly int xlfFiles = 166;
  273. public static readonly int xlfIpmt = 167;
  274. public static readonly int xlfPpmt = 168;
  275. public static readonly int xlfCounta = 169;
  276. public static readonly int xlfCancelKey = 170;
  277. public static readonly int xlfInitiate = 175;
  278. public static readonly int xlfRequest = 176;
  279. public static readonly int xlfPoke = 177;
  280. public static readonly int xlfExecute = 178;
  281. public static readonly int xlfTerminate = 179;
  282. public static readonly int xlfRestart = 180;
  283. public static readonly int xlfHelp = 181;
  284. public static readonly int xlfGetBar = 182;
  285. public static readonly int xlfProduct = 183;
  286. public static readonly int xlfFact = 184;
  287. public static readonly int xlfGetCell = 185;
  288. public static readonly int xlfGetWorkspace = 186;
  289. public static readonly int xlfGetWindow = 187;
  290. public static readonly int xlfGetDocument = 188;
  291. public static readonly int xlfDproduct = 189;
  292. public static readonly int xlfIsnontext = 190;
  293. public static readonly int xlfGetNote = 191;
  294. public static readonly int xlfNote = 192;
  295. public static readonly int xlfStdevp = 193;
  296. public static readonly int xlfVarp = 194;
  297. public static readonly int xlfDstdevp = 195;
  298. public static readonly int xlfDvarp = 196;
  299. public static readonly int xlfTrunc = 197;
  300. public static readonly int xlfIslogical = 198;
  301. public static readonly int xlfDcounta = 199;
  302. public static readonly int xlfDeleteBar = 200;
  303. public static readonly int xlfUnregister = 201;
  304. public static readonly int xlfUsdollar = 204;
  305. public static readonly int xlfFindb = 205;
  306. public static readonly int xlfSearchb = 206;
  307. public static readonly int xlfReplaceb = 207;
  308. public static readonly int xlfLeftb = 208;
  309. public static readonly int xlfRightb = 209;
  310. public static readonly int xlfMidb = 210;
  311. public static readonly int xlfLenb = 211;
  312. public static readonly int xlfRoundup = 212;
  313. public static readonly int xlfRounddown = 213;
  314. public static readonly int xlfAsc = 214;
  315. public static readonly int xlfDbcs = 215;
  316. public static readonly int xlfRank = 216;
  317. public static readonly int xlfAddress = 219;
  318. public static readonly int xlfDays360 = 220;
  319. public static readonly int xlfToday = 221;
  320. public static readonly int xlfVdb = 222;
  321. public static readonly int xlfMedian = 227;
  322. public static readonly int xlfSumproduct = 228;
  323. public static readonly int xlfSinh = 229;
  324. public static readonly int xlfCosh = 230;
  325. public static readonly int xlfTanh = 231;
  326. public static readonly int xlfAsinh = 232;
  327. public static readonly int xlfAcosh = 233;
  328. public static readonly int xlfAtanh = 234;
  329. public static readonly int xlfDget = 235;
  330. public static readonly int xlfCreateObject = 236;
  331. public static readonly int xlfVolatile = 237;
  332. public static readonly int xlfLastError = 238;
  333. public static readonly int xlfCustomUndo = 239;
  334. public static readonly int xlfCustomRepeat = 240;
  335. public static readonly int xlfFormulaConvert = 241;
  336. public static readonly int xlfGetLinkInfo = 242;
  337. public static readonly int xlfTextBox = 243;
  338. public static readonly int xlfInfo = 244;
  339. public static readonly int xlfGroup = 245;
  340. public static readonly int xlfGetObject = 246;
  341. public static readonly int xlfDb = 247;
  342. public static readonly int xlfPause = 248;
  343. public static readonly int xlfResume = 251;
  344. public static readonly int xlfFrequency = 252;
  345. public static readonly int xlfAddToolbar = 253;
  346. public static readonly int xlfDeleteToolbar = 254;
  347. public static readonly int xlfResetToolbar = 256;
  348. public static readonly int xlfEvaluate = 257;
  349. public static readonly int xlfGetToolbar = 258;
  350. public static readonly int xlfGetTool = 259;
  351. public static readonly int xlfSpellingCheck = 260;
  352. public static readonly int xlfErrorType = 261;
  353. public static readonly int xlfAppTitle = 262;
  354. public static readonly int xlfWindowTitle = 263;
  355. public static readonly int xlfSaveToolbar = 264;
  356. public static readonly int xlfEnableTool = 265;
  357. public static readonly int xlfPressTool = 266;
  358. public static readonly int xlfRegisterId = 267;
  359. public static readonly int xlfGetWorkbook = 268;
  360. public static readonly int xlfAvedev = 269;
  361. public static readonly int xlfBetadist = 270;
  362. public static readonly int xlfGammaln = 271;
  363. public static readonly int xlfBetainv = 272;
  364. public static readonly int xlfBinomdist = 273;
  365. public static readonly int xlfChidist = 274;
  366. public static readonly int xlfChiinv = 275;
  367. public static readonly int xlfCombin = 276;
  368. public static readonly int xlfConfidence = 277;
  369. public static readonly int xlfCritbinom = 278;
  370. public static readonly int xlfEven = 279;
  371. public static readonly int xlfExpondist = 280;
  372. public static readonly int xlfFdist = 281;
  373. public static readonly int xlfFinv = 282;
  374. public static readonly int xlfFisher = 283;
  375. public static readonly int xlfFisherinv = 284;
  376. public static readonly int xlfFloor = 285;
  377. public static readonly int xlfGammadist = 286;
  378. public static readonly int xlfGammainv = 287;
  379. public static readonly int xlfCeiling = 288;
  380. public static readonly int xlfHypgeomdist = 289;
  381. public static readonly int xlfLognormdist = 290;
  382. public static readonly int xlfLoginv = 291;
  383. public static readonly int xlfNegbinomdist = 292;
  384. public static readonly int xlfNormdist = 293;
  385. public static readonly int xlfNormsdist = 294;
  386. public static readonly int xlfNorminv = 295;
  387. public static readonly int xlfNormsinv = 296;
  388. public static readonly int xlfStandardize = 297;
  389. public static readonly int xlfOdd = 298;
  390. public static readonly int xlfPermut = 299;
  391. public static readonly int xlfPoisson = 300;
  392. public static readonly int xlfTdist = 301;
  393. public static readonly int xlfWeibull = 302;
  394. public static readonly int xlfSumxmy2 = 303;
  395. public static readonly int xlfSumx2my2 = 304;
  396. public static readonly int xlfSumx2py2 = 305;
  397. public static readonly int xlfChitest = 306;
  398. public static readonly int xlfCorrel = 307;
  399. public static readonly int xlfCovar = 308;
  400. public static readonly int xlfForecast = 309;
  401. public static readonly int xlfFtest = 310;
  402. public static readonly int xlfIntercept = 311;
  403. public static readonly int xlfPearson = 312;
  404. public static readonly int xlfRsq = 313;
  405. public static readonly int xlfSteyx = 314;
  406. public static readonly int xlfSlope = 315;
  407. public static readonly int xlfTtest = 316;
  408. public static readonly int xlfProb = 317;
  409. public static readonly int xlfDevsq = 318;
  410. public static readonly int xlfGeomean = 319;
  411. public static readonly int xlfHarmean = 320;
  412. public static readonly int xlfSumsq = 321;
  413. public static readonly int xlfKurt = 322;
  414. public static readonly int xlfSkew = 323;
  415. public static readonly int xlfZtest = 324;
  416. public static readonly int xlfLarge = 325;
  417. public static readonly int xlfSmall = 326;
  418. public static readonly int xlfQuartile = 327;
  419. public static readonly int xlfPercentile = 328;
  420. public static readonly int xlfPercentrank = 329;
  421. public static readonly int xlfMode = 330;
  422. public static readonly int xlfTrimmean = 331;
  423. public static readonly int xlfTinv = 332;
  424. public static readonly int xlfMovieCommand = 334;
  425. public static readonly int xlfGetMovie = 335;
  426. public static readonly int xlfConcatenate = 336;
  427. public static readonly int xlfPower = 337;
  428. public static readonly int xlfPivotAddData = 338;
  429. public static readonly int xlfGetPivotTable = 339;
  430. public static readonly int xlfGetPivotField = 340;
  431. public static readonly int xlfGetPivotItem = 341;
  432. public static readonly int xlfRadians = 342;
  433. public static readonly int xlfDegrees = 343;
  434. public static readonly int xlfSubtotal = 344;
  435. public static readonly int xlfSumif = 345;
  436. public static readonly int xlfCountif = 346;
  437. public static readonly int xlfCountblank = 347;
  438. public static readonly int xlfScenarioGet = 348;
  439. public static readonly int xlfOptionsListsGet = 349;
  440. public static readonly int xlfIspmt = 350;
  441. public static readonly int xlfDatedif = 351;
  442. public static readonly int xlfDatestring = 352;
  443. public static readonly int xlfNumberstring = 353;
  444. public static readonly int xlfRoman = 354;
  445. public static readonly int xlfOpenDialog = 355;
  446. public static readonly int xlfSaveDialog = 356;
  447. public static readonly int xlfViewGet = 357;
  448. public static readonly int xlfGetpivotdata = 358;
  449. public static readonly int xlfHyperlink = 359;
  450. public static readonly int xlfPhonetic = 360;
  451. public static readonly int xlfAveragea = 361;
  452. public static readonly int xlfMaxa = 362;
  453. public static readonly int xlfMina = 363;
  454. public static readonly int xlfStdevpa = 364;
  455. public static readonly int xlfVarpa = 365;
  456. public static readonly int xlfStdeva = 366;
  457. public static readonly int xlfVara = 367;
  458. public static readonly int xlfBahttext = 368;
  459. public static readonly int xlfThaidayofweek = 369;
  460. public static readonly int xlfThaidigit = 370;
  461. public static readonly int xlfThaimonthofyear = 371;
  462. public static readonly int xlfThainumsound = 372;
  463. public static readonly int xlfThainumstring = 373;
  464. public static readonly int xlfThaistringlength = 374;
  465. public static readonly int xlfIsthaidigit = 375;
  466. public static readonly int xlfRoundbahtdown = 376;
  467. public static readonly int xlfRoundbahtup = 377;
  468. public static readonly int xlfThaiyear = 378;
  469. public static readonly int xlfRtd = 379;
  470. public static readonly int xlfCubevalue = 380;
  471. public static readonly int xlfCubemember = 381;
  472. public static readonly int xlfCubememberproperty = 382;
  473. public static readonly int xlfCuberankedmember = 383;
  474. public static readonly int xlfHex2bin = 384;
  475. public static readonly int xlfHex2dec = 385;
  476. public static readonly int xlfHex2oct = 386;
  477. public static readonly int xlfDec2bin = 387;
  478. public static readonly int xlfDec2hex = 388;
  479. public static readonly int xlfDec2oct = 389;
  480. public static readonly int xlfOct2bin = 390;
  481. public static readonly int xlfOct2hex = 391;
  482. public static readonly int xlfOct2dec = 392;
  483. public static readonly int xlfBin2dec = 393;
  484. public static readonly int xlfBin2oct = 394;
  485. public static readonly int xlfBin2hex = 395;
  486. public static readonly int xlfImsub = 396;
  487. public static readonly int xlfImdiv = 397;
  488. public static readonly int xlfImpower = 398;
  489. public static readonly int xlfImabs = 399;
  490. public static readonly int xlfImsqrt = 400;
  491. public static readonly int xlfImln = 401;
  492. public static readonly int xlfImlog2 = 402;
  493. public static readonly int xlfImlog10 = 403;
  494. public static readonly int xlfImsin = 404;
  495. public static readonly int xlfImcos = 405;
  496. public static readonly int xlfImexp = 406;
  497. public static readonly int xlfImargument = 407;
  498. public static readonly int xlfImconjugate = 408;
  499. public static readonly int xlfImaginary = 409;
  500. public static readonly int xlfImreal = 410;
  501. public static readonly int xlfComplex = 411;
  502. public static readonly int xlfImsum = 412;
  503. public static readonly int xlfImproduct = 413;
  504. public static readonly int xlfSeriessum = 414;
  505. public static readonly int xlfFactdouble = 415;
  506. public static readonly int xlfSqrtpi = 416;
  507. public static readonly int xlfQuotient = 417;
  508. public static readonly int xlfDelta = 418;
  509. public static readonly int xlfGestep = 419;
  510. public static readonly int xlfIseven = 420;
  511. public static readonly int xlfIsodd = 421;
  512. public static readonly int xlfMround = 422;
  513. public static readonly int xlfErf = 423;
  514. public static readonly int xlfErfc = 424;
  515. public static readonly int xlfBesselj = 425;
  516. public static readonly int xlfBesselk = 426;
  517. public static readonly int xlfBessely = 427;
  518. public static readonly int xlfBesseli = 428;
  519. public static readonly int xlfXirr = 429;
  520. public static readonly int xlfXnpv = 430;
  521. public static readonly int xlfPricemat = 431;
  522. public static readonly int xlfYieldmat = 432;
  523. public static readonly int xlfIntrate = 433;
  524. public static readonly int xlfReceived = 434;
  525. public static readonly int xlfDisc = 435;
  526. public static readonly int xlfPricedisc = 436;
  527. public static readonly int xlfYielddisc = 437;
  528. public static readonly int xlfTbilleq = 438;
  529. public static readonly int xlfTbillprice = 439;
  530. public static readonly int xlfTbillyield = 440;
  531. public static readonly int xlfPrice = 441;
  532. public static readonly int xlfYield = 442;
  533. public static readonly int xlfDollarde = 443;
  534. public static readonly int xlfDollarfr = 444;
  535. public static readonly int xlfNominal = 445;
  536. public static readonly int xlfEffect = 446;
  537. public static readonly int xlfCumprinc = 447;
  538. public static readonly int xlfCumipmt = 448;
  539. public static readonly int xlfEdate = 449;
  540. public static readonly int xlfEomonth = 450;
  541. public static readonly int xlfYearfrac = 451;
  542. public static readonly int xlfCoupdaybs = 452;
  543. public static readonly int xlfCoupdays = 453;
  544. public static readonly int xlfCoupdaysnc = 454;
  545. public static readonly int xlfCoupncd = 455;
  546. public static readonly int xlfCoupnum = 456;
  547. public static readonly int xlfCouppcd = 457;
  548. public static readonly int xlfDuration = 458;
  549. public static readonly int xlfMduration = 459;
  550. public static readonly int xlfOddlprice = 460;
  551. public static readonly int xlfOddlyield = 461;
  552. public static readonly int xlfOddfprice = 462;
  553. public static readonly int xlfOddfyield = 463;
  554. public static readonly int xlfRandbetween = 464;
  555. public static readonly int xlfWeeknum = 465;
  556. public static readonly int xlfAmordegrc = 466;
  557. public static readonly int xlfAmorlinc = 467;
  558. public static readonly int xlfConvert = 468;
  559. public static readonly int xlfAccrint = 469;
  560. public static readonly int xlfAccrintm = 470;
  561. public static readonly int xlfWorkday = 471;
  562. public static readonly int xlfNetworkdays = 472;
  563. public static readonly int xlfGcd = 473;
  564. public static readonly int xlfMultinomial = 474;
  565. public static readonly int xlfLcm = 475;
  566. public static readonly int xlfFvschedule = 476;
  567. public static readonly int xlfCubekpimember = 477;
  568. public static readonly int xlfCubeset = 478;
  569. public static readonly int xlfCubesetcount = 479;
  570. public static readonly int xlfIferror = 480;
  571. public static readonly int xlfCountifs = 481;
  572. public static readonly int xlfSumifs = 482;
  573. public static readonly int xlfAverageif = 483;
  574. public static readonly int xlfAverageifs = 484;
  575. public static readonly int xlfAggregate = 485;
  576. public static readonly int xlfBinom_dist = 486;
  577. public static readonly int xlfBinom_inv = 487;
  578. public static readonly int xlfConfidence_norm = 488;
  579. public static readonly int xlfConfidence_t = 489;
  580. public static readonly int xlfChisq_test = 490;
  581. public static readonly int xlfF_test = 491;
  582. public static readonly int xlfCovariance_p = 492;
  583. public static readonly int xlfCovariance_s = 493;
  584. public static readonly int xlfExpon_dist = 494;
  585. public static readonly int xlfGamma_dist = 495;
  586. public static readonly int xlfGamma_inv = 496;
  587. public static readonly int xlfMode_mult = 497;
  588. public static readonly int xlfMode_sngl = 498;
  589. public static readonly int xlfNorm_dist = 499;
  590. public static readonly int xlfNorm_inv = 500;
  591. public static readonly int xlfPercentile_exc = 501;
  592. public static readonly int xlfPercentile_inc = 502;
  593. public static readonly int xlfPercentrank_exc = 503;
  594. public static readonly int xlfPercentrank_inc = 504;
  595. public static readonly int xlfPoisson_dist = 505;
  596. public static readonly int xlfQuartile_exc = 506;
  597. public static readonly int xlfQuartile_inc = 507;
  598. public static readonly int xlfRank_avg = 508;
  599. public static readonly int xlfRank_eq = 509;
  600. public static readonly int xlfStdev_s = 510;
  601. public static readonly int xlfStdev_p = 511;
  602. public static readonly int xlfT_dist = 512;
  603. public static readonly int xlfT_dist_2t = 513;
  604. public static readonly int xlfT_dist_rt = 514;
  605. public static readonly int xlfT_inv = 515;
  606. public static readonly int xlfT_inv_2t = 516;
  607. public static readonly int xlfVar_s = 517;
  608. public static readonly int xlfVar_p = 518;
  609. public static readonly int xlfWeibull_dist = 519;
  610. public static readonly int xlfNetworkdays_intl = 520;
  611. public static readonly int xlfWorkday_intl = 521;
  612. public static readonly int xlfEcma_ceiling = 522;
  613. public static readonly int xlfIso_ceiling = 523;
  614. public static readonly int xlfBeta_dist = 525;
  615. public static readonly int xlfBeta_inv = 526;
  616. public static readonly int xlfChisq_dist = 527;
  617. public static readonly int xlfChisq_dist_rt = 528;
  618. public static readonly int xlfChisq_inv = 529;
  619. public static readonly int xlfChisq_inv_rt = 530;
  620. public static readonly int xlfF_dist = 531;
  621. public static readonly int xlfF_dist_rt = 532;
  622. public static readonly int xlfF_inv = 533;
  623. public static readonly int xlfF_inv_rt = 534;
  624. public static readonly int xlfHypgeom_dist = 535;
  625. public static readonly int xlfLognorm_dist = 536;
  626. public static readonly int xlfLognorm_inv = 537;
  627. public static readonly int xlfNegbinom_dist = 538;
  628. public static readonly int xlfNorm_s_dist = 539;
  629. public static readonly int xlfNorm_s_inv = 540;
  630. public static readonly int xlfT_test = 541;
  631. public static readonly int xlfZ_test = 542;
  632. public static readonly int xlfErf_precise = 543;
  633. public static readonly int xlfErfc_precise = 544;
  634. public static readonly int xlfGammaln_precise = 545;
  635. public static readonly int xlfCeiling_precise = 546;
  636. public static readonly int xlfFloor_precise = 547;
  637. /* Excel command numbers */
  638. public static readonly int xlcBeep = (0 | xlCommand);
  639. public static readonly int xlcOpen = (1 | xlCommand);
  640. public static readonly int xlcOpenLinks = (2 | xlCommand);
  641. public static readonly int xlcCloseAll = (3 | xlCommand);
  642. public static readonly int xlcSave = (4 | xlCommand);
  643. public static readonly int xlcSaveAs = (5 | xlCommand);
  644. public static readonly int xlcFileDelete = (6 | xlCommand);
  645. public static readonly int xlcPageSetup = (7 | xlCommand);
  646. public static readonly int xlcPrint = (8 | xlCommand);
  647. public static readonly int xlcPrinterSetup = (9 | xlCommand);
  648. public static readonly int xlcQuit = (10 | xlCommand);
  649. public static readonly int xlcNewWindow = (11 | xlCommand);
  650. public static readonly int xlcArrangeAll = (12 | xlCommand);
  651. public static readonly int xlcWindowSize = (13 | xlCommand);
  652. public static readonly int xlcWindowMove = (14 | xlCommand);
  653. public static readonly int xlcFull = (15 | xlCommand);
  654. public static readonly int xlcClose = (16 | xlCommand);
  655. public static readonly int xlcRun = (17 | xlCommand);
  656. public static readonly int xlcSetPrintArea = (22 | xlCommand);
  657. public static readonly int xlcSetPrintTitles = (23 | xlCommand);
  658. public static readonly int xlcSetPageBreak = (24 | xlCommand);
  659. public static readonly int xlcRemovePageBreak = (25 | xlCommand);
  660. public static readonly int xlcFont = (26 | xlCommand);
  661. public static readonly int xlcDisplay = (27 | xlCommand);
  662. public static readonly int xlcProtectDocument = (28 | xlCommand);
  663. public static readonly int xlcPrecision = (29 | xlCommand);
  664. public static readonly int xlcA1R1c1 = (30 | xlCommand);
  665. public static readonly int xlcCalculateNow = (31 | xlCommand);
  666. public static readonly int xlcCalculation = (32 | xlCommand);
  667. public static readonly int xlcDataFind = (34 | xlCommand);
  668. public static readonly int xlcExtract = (35 | xlCommand);
  669. public static readonly int xlcDataDelete = (36 | xlCommand);
  670. public static readonly int xlcSetDatabase = (37 | xlCommand);
  671. public static readonly int xlcSetCriteria = (38 | xlCommand);
  672. public static readonly int xlcSort = (39 | xlCommand);
  673. public static readonly int xlcDataSeries = (40 | xlCommand);
  674. public static readonly int xlcTable = (41 | xlCommand);
  675. public static readonly int xlcFormatNumber = (42 | xlCommand);
  676. public static readonly int xlcAlignment = (43 | xlCommand);
  677. public static readonly int xlcStyle = (44 | xlCommand);
  678. public static readonly int xlcBorder = (45 | xlCommand);
  679. public static readonly int xlcCellProtection = (46 | xlCommand);
  680. public static readonly int xlcColumnWidth = (47 | xlCommand);
  681. public static readonly int xlcUndo = (48 | xlCommand);
  682. public static readonly int xlcCut = (49 | xlCommand);
  683. public static readonly int xlcCopy = (50 | xlCommand);
  684. public static readonly int xlcPaste = (51 | xlCommand);
  685. public static readonly int xlcClear = (52 | xlCommand);
  686. public static readonly int xlcPasteSpecial = (53 | xlCommand);
  687. public static readonly int xlcEditDelete = (54 | xlCommand);
  688. public static readonly int xlcInsert = (55 | xlCommand);
  689. public static readonly int xlcFillRight = (56 | xlCommand);
  690. public static readonly int xlcFillDown = (57 | xlCommand);
  691. public static readonly int xlcDefineName = (61 | xlCommand);
  692. public static readonly int xlcCreateNames = (62 | xlCommand);
  693. public static readonly int xlcFormulaGoto = (63 | xlCommand);
  694. public static readonly int xlcFormulaFind = (64 | xlCommand);
  695. public static readonly int xlcSelectLastCell = (65 | xlCommand);
  696. public static readonly int xlcShowActiveCell = (66 | xlCommand);
  697. public static readonly int xlcGalleryArea = (67 | xlCommand);
  698. public static readonly int xlcGalleryBar = (68 | xlCommand);
  699. public static readonly int xlcGalleryColumn = (69 | xlCommand);
  700. public static readonly int xlcGalleryLine = (70 | xlCommand);
  701. public static readonly int xlcGalleryPie = (71 | xlCommand);
  702. public static readonly int xlcGalleryScatter = (72 | xlCommand);
  703. public static readonly int xlcCombination = (73 | xlCommand);
  704. public static readonly int xlcPreferred = (74 | xlCommand);
  705. public static readonly int xlcAddOverlay = (75 | xlCommand);
  706. public static readonly int xlcGridlines = (76 | xlCommand);
  707. public static readonly int xlcSetPreferred = (77 | xlCommand);
  708. public static readonly int xlcAxes = (78 | xlCommand);
  709. public static readonly int xlcLegend = (79 | xlCommand);
  710. public static readonly int xlcAttachText = (80 | xlCommand);
  711. public static readonly int xlcAddArrow = (81 | xlCommand);
  712. public static readonly int xlcSelectChart = (82 | xlCommand);
  713. public static readonly int xlcSelectPlotArea = (83 | xlCommand);
  714. public static readonly int xlcPatterns = (84 | xlCommand);
  715. public static readonly int xlcMainChart = (85 | xlCommand);
  716. public static readonly int xlcOverlay = (86 | xlCommand);
  717. public static readonly int xlcScale = (87 | xlCommand);
  718. public static readonly int xlcFormatLegend = (88 | xlCommand);
  719. public static readonly int xlcFormatText = (89 | xlCommand);
  720. public static readonly int xlcEditRepeat = (90 | xlCommand);
  721. public static readonly int xlcParse = (91 | xlCommand);
  722. public static readonly int xlcJustify = (92 | xlCommand);
  723. public static readonly int xlcHide = (93 | xlCommand);
  724. public static readonly int xlcUnhide = (94 | xlCommand);
  725. public static readonly int xlcWorkspace = (95 | xlCommand);
  726. public static readonly int xlcFormula = (96 | xlCommand);
  727. public static readonly int xlcFormulaFill = (97 | xlCommand);
  728. public static readonly int xlcFormulaArray = (98 | xlCommand);
  729. public static readonly int xlcDataFindNext = (99 | xlCommand);
  730. public static readonly int xlcDataFindPrev = (100 | xlCommand);
  731. public static readonly int xlcFormulaFindNext = (101 | xlCommand);
  732. public static readonly int xlcFormulaFindPrev = (102 | xlCommand);
  733. public static readonly int xlcActivate = (103 | xlCommand);
  734. public static readonly int xlcActivateNext = (104 | xlCommand);
  735. public static readonly int xlcActivatePrev = (105 | xlCommand);
  736. public static readonly int xlcUnlockedNext = (106 | xlCommand);
  737. public static readonly int xlcUnlockedPrev = (107 | xlCommand);
  738. public static readonly int xlcCopyPicture = (108 | xlCommand);
  739. public static readonly int xlcSelect = (109 | xlCommand);
  740. public static readonly int xlcDeleteName = (110 | xlCommand);
  741. public static readonly int xlcDeleteFormat = (111 | xlCommand);
  742. public static readonly int xlcVline = (112 | xlCommand);
  743. public static readonly int xlcHline = (113 | xlCommand);
  744. public static readonly int xlcVpage = (114 | xlCommand);
  745. public static readonly int xlcHpage = (115 | xlCommand);
  746. public static readonly int xlcVscroll = (116 | xlCommand);
  747. public static readonly int xlcHscroll = (117 | xlCommand);
  748. public static readonly int xlcAlert = (118 | xlCommand);
  749. public static readonly int xlcNew = (119 | xlCommand);
  750. public static readonly int xlcCancelCopy = (120 | xlCommand);
  751. public static readonly int xlcShowClipboard = (121 | xlCommand);
  752. public static readonly int xlcMessage = (122 | xlCommand);
  753. public static readonly int xlcPasteLink = (124 | xlCommand);
  754. public static readonly int xlcAppActivate = (125 | xlCommand);
  755. public static readonly int xlcDeleteArrow = (126 | xlCommand);
  756. public static readonly int xlcRowHeight = (127 | xlCommand);
  757. public static readonly int xlcFormatMove = (128 | xlCommand);
  758. public static readonly int xlcFormatSize = (129 | xlCommand);
  759. public static readonly int xlcFormulaReplace = (130 | xlCommand);
  760. public static readonly int xlcSendKeys = (131 | xlCommand);
  761. public static readonly int xlcSelectSpecial = (132 | xlCommand);
  762. public static readonly int xlcApplyNames = (133 | xlCommand);
  763. public static readonly int xlcReplaceFont = (134 | xlCommand);
  764. public static readonly int xlcFreezePanes = (135 | xlCommand);
  765. public static readonly int xlcShowInfo = (136 | xlCommand);
  766. public static readonly int xlcSplit = (137 | xlCommand);
  767. public static readonly int xlcOnWindow = (138 | xlCommand);
  768. public static readonly int xlcOnData = (139 | xlCommand);
  769. public static readonly int xlcDisableInput = (140 | xlCommand);
  770. public static readonly int xlcEcho = (141 | xlCommand);
  771. public static readonly int xlcOutline = (142 | xlCommand);
  772. public static readonly int xlcListNames = (143 | xlCommand);
  773. public static readonly int xlcFileClose = (144 | xlCommand);
  774. public static readonly int xlcSaveWorkbook = (145 | xlCommand);
  775. public static readonly int xlcDataForm = (146 | xlCommand);
  776. public static readonly int xlcCopyChart = (147 | xlCommand);
  777. public static readonly int xlcOnTime = (148 | xlCommand);
  778. public static readonly int xlcWait = (149 | xlCommand);
  779. public static readonly int xlcFormatFont = (150 | xlCommand);
  780. public static readonly int xlcFillUp = (151 | xlCommand);
  781. public static readonly int xlcFillLeft = (152 | xlCommand);
  782. public static readonly int xlcDeleteOverlay = (153 | xlCommand);
  783. public static readonly int xlcNote = (154 | xlCommand);
  784. public static readonly int xlcShortMenus = (155 | xlCommand);
  785. public static readonly int xlcSetUpdateStatus = (159 | xlCommand);
  786. public static readonly int xlcColorPalette = (161 | xlCommand);
  787. public static readonly int xlcDeleteStyle = (162 | xlCommand);
  788. public static readonly int xlcWindowRestore = (163 | xlCommand);
  789. public static readonly int xlcWindowMaximize = (164 | xlCommand);
  790. public static readonly int xlcError = (165 | xlCommand);
  791. public static readonly int xlcChangeLink = (166 | xlCommand);
  792. public static readonly int xlcCalculateDocument = (167 | xlCommand);
  793. public static readonly int xlcOnKey = (168 | xlCommand);
  794. public static readonly int xlcAppRestore = (169 | xlCommand);
  795. public static readonly int xlcAppMove = (170 | xlCommand);
  796. public static readonly int xlcAppSize = (171 | xlCommand);
  797. public static readonly int xlcAppMinimize = (172 | xlCommand);
  798. public static readonly int xlcAppMaximize = (173 | xlCommand);
  799. public static readonly int xlcBringToFront = (174 | xlCommand);
  800. public static readonly int xlcSendToBack = (175 | xlCommand);
  801. public static readonly int xlcMainChartType = (185 | xlCommand);
  802. public static readonly int xlcOverlayChartType = (186 | xlCommand);
  803. public static readonly int xlcSelectEnd = (187 | xlCommand);
  804. public static readonly int xlcOpenMail = (188 | xlCommand);
  805. public static readonly int xlcSendMail = (189 | xlCommand);
  806. public static readonly int xlcStandardFont = (190 | xlCommand);
  807. public static readonly int xlcConsolidate = (191 | xlCommand);
  808. public static readonly int xlcSortSpecial = (192 | xlCommand);
  809. public static readonly int xlcGallery3dArea = (193 | xlCommand);
  810. public static readonly int xlcGallery3dColumn = (194 | xlCommand);
  811. public static readonly int xlcGallery3dLine = (195 | xlCommand);
  812. public static readonly int xlcGallery3dPie = (196 | xlCommand);
  813. public static readonly int xlcView3d = (197 | xlCommand);
  814. public static readonly int xlcGoalSeek = (198 | xlCommand);
  815. public static readonly int xlcWorkgroup = (199 | xlCommand);
  816. public static readonly int xlcFillGroup = (200 | xlCommand);
  817. public static readonly int xlcUpdateLink = (201 | xlCommand);
  818. public static readonly int xlcPromote = (202 | xlCommand);
  819. public static readonly int xlcDemote = (203 | xlCommand);
  820. public static readonly int xlcShowDetail = (204 | xlCommand);
  821. public static readonly int xlcUngroup = (206 | xlCommand);
  822. public static readonly int xlcObjectProperties = (207 | xlCommand);
  823. public static readonly int xlcSaveNewObject = (208 | xlCommand);
  824. public static readonly int xlcShare = (209 | xlCommand);
  825. public static readonly int xlcShareName = (210 | xlCommand);
  826. public static readonly int xlcDuplicate = (211 | xlCommand);
  827. public static readonly int xlcApplyStyle = (212 | xlCommand);
  828. public static readonly int xlcAssignToObject = (213 | xlCommand);
  829. public static readonly int xlcObjectProtection = (214 | xlCommand);
  830. public static readonly int xlcHideObject = (215 | xlCommand);
  831. public static readonly int xlcSetExtract = (216 | xlCommand);
  832. public static readonly int xlcCreatePublisher = (217 | xlCommand);
  833. public static readonly int xlcSubscribeTo = (218 | xlCommand);
  834. public static readonly int xlcAttributes = (219 | xlCommand);
  835. public static readonly int xlcShowToolbar = (220 | xlCommand);
  836. public static readonly int xlcPrintPreview = (222 | xlCommand);
  837. public static readonly int xlcEditColor = (223 | xlCommand);
  838. public static readonly int xlcShowLevels = (224 | xlCommand);
  839. public static readonly int xlcFormatMain = (225 | xlCommand);
  840. public static readonly int xlcFormatOverlay = (226 | xlCommand);
  841. public static readonly int xlcOnRecalc = (227 | xlCommand);
  842. public static readonly int xlcEditSeries = (228 | xlCommand);
  843. public static readonly int xlcDefineStyle = (229 | xlCommand);
  844. public static readonly int xlcLinePrint = (240 | xlCommand);
  845. public static readonly int xlcEnterData = (243 | xlCommand);
  846. public static readonly int xlcGalleryRadar = (249 | xlCommand);
  847. public static readonly int xlcMergeStyles = (250 | xlCommand);
  848. public static readonly int xlcEditionOptions = (251 | xlCommand);
  849. public static readonly int xlcPastePicture = (252 | xlCommand);
  850. public static readonly int xlcPastePictureLink = (253 | xlCommand);
  851. public static readonly int xlcSpelling = (254 | xlCommand);
  852. public static readonly int xlcZoom = (256 | xlCommand);
  853. public static readonly int xlcResume = (258 | xlCommand);
  854. public static readonly int xlcInsertObject = (259 | xlCommand);
  855. public static readonly int xlcWindowMinimize = (260 | xlCommand);
  856. public static readonly int xlcSize = (261 | xlCommand);
  857. public static readonly int xlcMove = (262 | xlCommand);
  858. public static readonly int xlcSoundNote = (265 | xlCommand);
  859. public static readonly int xlcSoundPlay = (266 | xlCommand);
  860. public static readonly int xlcFormatShape = (267 | xlCommand);
  861. public static readonly int xlcExtendPolygon = (268 | xlCommand);
  862. public static readonly int xlcFormatAuto = (269 | xlCommand);
  863. public static readonly int xlcGallery3dBar = (272 | xlCommand);
  864. public static readonly int xlcGallery3dSurface = (273 | xlCommand);
  865. public static readonly int xlcFillAuto = (274 | xlCommand);
  866. public static readonly int xlcCustomizeToolbar = (276 | xlCommand);
  867. public static readonly int xlcAddTool = (277 | xlCommand);
  868. public static readonly int xlcEditObject = (278 | xlCommand);
  869. public static readonly int xlcOnDoubleclick = (279 | xlCommand);
  870. public static readonly int xlcOnEntry = (280 | xlCommand);
  871. public static readonly int xlcWorkbookAdd = (281 | xlCommand);
  872. public static readonly int xlcWorkbookMove = (282 | xlCommand);
  873. public static readonly int xlcWorkbookCopy = (283 | xlCommand);
  874. public static readonly int xlcWorkbookOptions = (284 | xlCommand);
  875. public static readonly int xlcSaveWorkspace = (285 | xlCommand);
  876. public static readonly int xlcChartWizard = (288 | xlCommand);
  877. public static readonly int xlcDeleteTool = (289 | xlCommand);
  878. public static readonly int xlcMoveTool = (290 | xlCommand);
  879. public static readonly int xlcWorkbookSelect = (291 | xlCommand);
  880. public static readonly int xlcWorkbookActivate = (292 | xlCommand);
  881. public static readonly int xlcAssignToTool = (293 | xlCommand);
  882. public static readonly int xlcCopyTool = (295 | xlCommand);
  883. public static readonly int xlcResetTool = (296 | xlCommand);
  884. public static readonly int xlcConstrainNumeric = (297 | xlCommand);
  885. public static readonly int xlcPasteTool = (298 | xlCommand);
  886. public static readonly int xlcPlacement = (300 | xlCommand);
  887. public static readonly int xlcFillWorkgroup = (301 | xlCommand);
  888. public static readonly int xlcWorkbookNew = (302 | xlCommand);
  889. public static readonly int xlcScenarioCells = (305 | xlCommand);
  890. public static readonly int xlcScenarioDelete = (306 | xlCommand);
  891. public static readonly int xlcScenarioAdd = (307 | xlCommand);
  892. public static readonly int xlcScenarioEdit = (308 | xlCommand);
  893. public static readonly int xlcScenarioShow = (309 | xlCommand);
  894. public static readonly int xlcScenarioShowNext = (310 | xlCommand);
  895. public static readonly int xlcScenarioSummary = (311 | xlCommand);
  896. public static readonly int xlcPivotTableWizard = (312 | xlCommand);
  897. public static readonly int xlcPivotFieldProperties = (313 | xlCommand);
  898. public static readonly int xlcPivotField = (314 | xlCommand);
  899. public static readonly int xlcPivotItem = (315 | xlCommand);
  900. public static readonly int xlcPivotAddFields = (316 | xlCommand);
  901. public static readonly int xlcOptionsCalculation = (318 | xlCommand);
  902. public static readonly int xlcOptionsEdit = (319 | xlCommand);
  903. public static readonly int xlcOptionsView = (320 | xlCommand);
  904. public static readonly int xlcAddinManager = (321 | xlCommand);
  905. public static readonly int xlcMenuEditor = (322 | xlCommand);
  906. public static readonly int xlcAttachToolbars = (323 | xlCommand);
  907. public static readonly int xlcVbaactivate = (324 | xlCommand);
  908. public static readonly int xlcOptionsChart = (325 | xlCommand);
  909. public static readonly int xlcVbaInsertFile = (328 | xlCommand);
  910. public static readonly int xlcVbaProcedureDefinition = (330 | xlCommand);
  911. public static readonly int xlcRoutingSlip = (336 | xlCommand);
  912. public static readonly int xlcRouteDocument = (338 | xlCommand);
  913. public static readonly int xlcMailLogon = (339 | xlCommand);
  914. public static readonly int xlcInsertPicture = (342 | xlCommand);
  915. public static readonly int xlcEditTool = (343 | xlCommand);
  916. public static readonly int xlcGalleryDoughnut = (344 | xlCommand);
  917. public static readonly int xlcChartTrend = (350 | xlCommand);
  918. public static readonly int xlcPivotItemProperties = (352 | xlCommand);
  919. public static readonly int xlcWorkbookInsert = (354 | xlCommand);
  920. public static readonly int xlcOptionsTransition = (355 | xlCommand);
  921. public static readonly int xlcOptionsGeneral = (356 | xlCommand);
  922. public static readonly int xlcFilterAdvanced = (370 | xlCommand);
  923. public static readonly int xlcMailAddMailer = (373 | xlCommand);
  924. public static readonly int xlcMailDeleteMailer = (374 | xlCommand);
  925. public static readonly int xlcMailReply = (375 | xlCommand);
  926. public static readonly int xlcMailReplyAll = (376 | xlCommand);
  927. public static readonly int xlcMailForward = (377 | xlCommand);
  928. public static readonly int xlcMailNextLetter = (378 | xlCommand);
  929. public static readonly int xlcDataLabel = (379 | xlCommand);
  930. public static readonly int xlcInsertTitle = (380 | xlCommand);
  931. public static readonly int xlcFontProperties = (381 | xlCommand);
  932. public static readonly int xlcMacroOptions = (382 | xlCommand);
  933. public static readonly int xlcWorkbookHide = (383 | xlCommand);
  934. public static readonly int xlcWorkbookUnhide = (384 | xlCommand);
  935. public static readonly int xlcWorkbookDelete = (385 | xlCommand);
  936. public static readonly int xlcWorkbookName = (386 | xlCommand);
  937. public static readonly int xlcGalleryCustom = (388 | xlCommand);
  938. public static readonly int xlcAddChartAutoformat = (390 | xlCommand);
  939. public static readonly int xlcDeleteChartAutoformat = (391 | xlCommand);
  940. public static readonly int xlcChartAddData = (392 | xlCommand);
  941. public static readonly int xlcAutoOutline = (393 | xlCommand);
  942. public static readonly int xlcTabOrder = (394 | xlCommand);
  943. public static readonly int xlcShowDialog = (395 | xlCommand);
  944. public static readonly int xlcSelectAll = (396 | xlCommand);
  945. public static readonly int xlcUngroupSheets = (397 | xlCommand);
  946. public static readonly int xlcSubtotalCreate = (398 | xlCommand);
  947. public static readonly int xlcSubtotalRemove = (399 | xlCommand);
  948. public static readonly int xlcRenameObject = (400 | xlCommand);
  949. public static readonly int xlcWorkbookScroll = (412 | xlCommand);
  950. public static readonly int xlcWorkbookNext = (413 | xlCommand);
  951. public static readonly int xlcWorkbookPrev = (414 | xlCommand);
  952. public static readonly int xlcWorkbookTabSplit = (415 | xlCommand);
  953. public static readonly int xlcFullScreen = (416 | xlCommand);
  954. public static readonly int xlcWorkbookProtect = (417 | xlCommand);
  955. public static readonly int xlcScrollbarProperties = (420 | xlCommand);
  956. public static readonly int xlcPivotShowPages = (421 | xlCommand);
  957. public static readonly int xlcTextToColumns = (422 | xlCommand);
  958. public static readonly int xlcFormatCharttype = (423 | xlCommand);
  959. public static readonly int xlcLinkFormat = (424 | xlCommand);
  960. public static readonly int xlcTracerDisplay = (425 | xlCommand);
  961. public static readonly int xlcTracerNavigate = (430 | xlCommand);
  962. public static readonly int xlcTracerClear = (431 | xlCommand);
  963. public static readonly int xlcTracerError = (432 | xlCommand);
  964. public static readonly int xlcPivotFieldGroup = (433 | xlCommand);
  965. public static readonly int xlcPivotFieldUngroup = (434 | xlCommand);
  966. public static readonly int xlcCheckboxProperties = (435 | xlCommand);
  967. public static readonly int xlcLabelProperties = (436 | xlCommand);
  968. public static readonly int xlcListboxProperties = (437 | xlCommand);
  969. public static readonly int xlcEditboxProperties = (438 | xlCommand);
  970. public static readonly int xlcPivotRefresh = (439 | xlCommand);
  971. public static readonly int xlcLinkCombo = (440 | xlCommand);
  972. public static readonly int xlcOpenText = (441 | xlCommand);
  973. public static readonly int xlcHideDialog = (442 | xlCommand);
  974. public static readonly int xlcSetDialogFocus = (443 | xlCommand);
  975. public static readonly int xlcEnableObject = (444 | xlCommand);
  976. public static readonly int xlcPushbuttonProperties = (445 | xlCommand);
  977. public static readonly int xlcSetDialogDefault = (446 | xlCommand);
  978. public static readonly int xlcFilter = (447 | xlCommand);
  979. public static readonly int xlcFilterShowAll = (448 | xlCommand);
  980. public static readonly int xlcClearOutline = (449 | xlCommand);
  981. public static readonly int xlcFunctionWizard = (450 | xlCommand);
  982. public static readonly int xlcAddListItem = (451 | xlCommand);
  983. public static readonly int xlcSetListItem = (452 | xlCommand);
  984. public static readonly int xlcRemoveListItem = (453 | xlCommand);
  985. public static readonly int xlcSelectListItem = (454 | xlCommand);
  986. public static readonly int xlcSetControlValue = (455 | xlCommand);
  987. public static readonly int xlcSaveCopyAs = (456 | xlCommand);
  988. public static readonly int xlcOptionsListsAdd = (458 | xlCommand);
  989. public static readonly int xlcOptionsListsDelete = (459 | xlCommand);
  990. public static readonly int xlcSeriesAxes = (460 | xlCommand);
  991. public static readonly int xlcSeriesX = (461 | xlCommand);
  992. public static readonly int xlcSeriesY = (462 | xlCommand);
  993. public static readonly int xlcErrorbarX = (463 | xlCommand);
  994. public static readonly int xlcErrorbarY = (464 | xlCommand);
  995. public static readonly int xlcFormatChart = (465 | xlCommand);
  996. public static readonly int xlcSeriesOrder = (466 | xlCommand);
  997. public static readonly int xlcMailLogoff = (467 | xlCommand);
  998. public static readonly int xlcClearRoutingSlip = (468 | xlCommand);
  999. public static readonly int xlcAppActivateMicrosoft = (469 | xlCommand);
  1000. public static readonly int xlcMailEditMailer = (470 | xlCommand);
  1001. public static readonly int xlcOnSheet = (471 | xlCommand);
  1002. public static readonly int xlcStandardWidth = (472 | xlCommand);
  1003. public static readonly int xlcScenarioMerge = (473 | xlCommand);
  1004. public static readonly int xlcSummaryInfo = (474 | xlCommand);
  1005. public static readonly int xlcFindFile = (475 | xlCommand);
  1006. public static readonly int xlcActiveCellFont = (476 | xlCommand);
  1007. public static readonly int xlcEnableTipwizard = (477 | xlCommand);
  1008. public static readonly int xlcVbaMakeAddin = (478 | xlCommand);
  1009. public static readonly int xlcInsertdatatable = (480 | xlCommand);
  1010. public static readonly int xlcWorkgroupOptions = (481 | xlCommand);
  1011. public static readonly int xlcMailSendMailer = (482 | xlCommand);
  1012. public static readonly int xlcAutocorrect = (485 | xlCommand);
  1013. public static readonly int xlcPostDocument = (489 | xlCommand);
  1014. public static readonly int xlcPicklist = (491 | xlCommand);
  1015. public static readonly int xlcViewShow = (493 | xlCommand);
  1016. public static readonly int xlcViewDefine = (494 | xlCommand);
  1017. public static readonly int xlcViewDelete = (495 | xlCommand);
  1018. public static readonly int xlcSheetBackground = (509 | xlCommand);
  1019. public static readonly int xlcInsertMapObject = (510 | xlCommand);
  1020. public static readonly int xlcOptionsMenono = (511 | xlCommand);
  1021. public static readonly int xlcNormal = (518 | xlCommand);
  1022. public static readonly int xlcLayout = (519 | xlCommand);
  1023. public static readonly int xlcRmPrintArea = (520 | xlCommand);
  1024. public static readonly int xlcClearPrintArea = (521 | xlCommand);
  1025. public static readonly int xlcAddPrintArea = (522 | xlCommand);
  1026. public static readonly int xlcMoveBrk = (523 | xlCommand);
  1027. public static readonly int xlcHidecurrNote = (545 | xlCommand);
  1028. public static readonly int xlcHideallNotes = (546 | xlCommand);
  1029. public static readonly int xlcDeleteNote = (547 | xlCommand);
  1030. public static readonly int xlcTraverseNotes = (548 | xlCommand);
  1031. public static readonly int xlcActivateNotes = (549 | xlCommand);
  1032. public static readonly int xlcProtectRevisions = (620 | xlCommand);
  1033. public static readonly int xlcUnprotectRevisions = (621 | xlCommand);
  1034. public static readonly int xlcOptionsMe = (647 | xlCommand);
  1035. public static readonly int xlcWebPublish = (653 | xlCommand);
  1036. public static readonly int xlcNewwebquery = (667 | xlCommand);
  1037. public static readonly int xlcPivotTableChart = (673 | xlCommand);
  1038. public static readonly int xlcOptionsSave = (753 | xlCommand);
  1039. public static readonly int xlcOptionsSpell = (755 | xlCommand);
  1040. public static readonly int xlcHideallInkannots = (808 | xlCommand);
  1041. // THROWS: XlCallException if anything goes wrong.
  1042. public static object Excel(int xlFunction, params object[] parameters )
  1043. {
  1044. object result;
  1045. XlReturn xlReturn = TryExcel(xlFunction, out result, parameters);
  1046. if (xlReturn == XlReturn.XlReturnSuccess)
  1047. {
  1048. return result;
  1049. }
  1050. else
  1051. {
  1052. throw new XlCallException(xlReturn);
  1053. }
  1054. }
  1055. public static XlReturn TryExcel(int xlFunction, out object result, params object[] parameters)
  1056. {
  1057. return Integration.TryExcelImpl(xlFunction, out result, parameters);
  1058. }
  1059. public static object RTD(string progId, string server, params string[] topics)
  1060. {
  1061. return Rtd.ExcelRtd.RTD(progId, server, topics);
  1062. }
  1063. }
  1064. public class XlCallException : Exception
  1065. {
  1066. public XlCall.XlReturn xlReturn;
  1067. public XlCallException(XlCall.XlReturn xlReturn)
  1068. {
  1069. this.xlReturn = xlReturn;
  1070. }
  1071. }
  1072. }