- How to hide the tab with sheets in the bottom of the workbook.
- How to hide the headings.
- How to use a build-in function.
- How to send a keybord shortcut to the Excel.
- How to merge all cells in the sheet.
1. How to hide the tab with sheets in the bottom of the workbook.
this.Application.ActiveWindow.DisplayWorkbookTabs = false;
2. How to hide the headings.
this.Application.ActiveWindow.DisplayHeadings = false;
3. How to use a build-in function.
Excel.WorksheetFunction func = this.Application.WorksheetFunction;
string dec2bin = func.Dec2Bin(13, 8);
4. How to send a keybord shortcut to the Excel.
SendKeys.Send("%cm");
or
SendKeys.Send("{HELP}");
where
Key
|
Argument
|
ALT
|
% |
CTRL |
^
|
SHIFT |
+
|
BACKSPACE
|
{BACKSPACE}, {BS}, or {BKSP}
|
BREAK
|
{BREAK}
|
CAPS LOCK
|
{CAPSLOCK}
|
DEL or DELETE
|
{DELETE} or {DEL}
|
DOWN ARROW
|
{DOWN}
|
END
|
{END}
|
ENTER
|
{ENTER} or ~
|
ESC
|
{ESC}
|
HELP
|
{HELP}
|
HOME
|
{HOME}
|
INS or INSERT
|
{INSERT} or {INS}
|
LEFT ARROW
|
{LEFT}
|
NUM LOCK
|
{NUMLOCK}
|
PAGE DOWN
|
{PGDN}
|
PAGE UP
|
{PGUP}
|
PRINT SCREEN
|
{PRTSC}
|
RIGHT ARROW
|
{RIGHT}
|
SCROLL LOCK
|
{SCROLLLOCK}
|
TAB
|
{TAB}
|
UP ARROW
|
{UP}
|
F1 throught F16
|
{F1}through {F16}
|
5. How to merge all cells in the sheet.
this.Application.Cells.Select();
this.Application.Cells.Merge(System.Type.Missing);