Monday, April 29, 2019

Peoplesoft: Add Manager into CC List in Generic Email Template


Open APP designer, EOAW_CORE Application Package, NotificationManager App Class

method Notify
   /+ &from_ as String, +/
   /+ &templateID_ as String, +/
   /+ &aryOpridTo_ as Array of String, +/
   /+ &pageURL_ as String, +/
   /+ &strSQLId_ as String, +/
   /+ &recThread_ as Record +/
   Local array of string &aryValues;
   Local array of PT_WF_NOTIFICATION:NotificationAddress &notifyTo;
   Local string &URL, &XMLVars;
   Local boolean &Status;
   Local PT_WF_NOTIFICATION:NotificationAddress &NotifyAddress;
   Local PT_WF_NOTIFICATION:NotificationTemplate &NotifyTemplate;
   Local PT_WF_NOTIFICATION:Notification &Notification;
   Local integer &i;
   Local string &opridTo, &emailTo, &oprDesc, &lng;
 
   Local array of string &langs = CreateArrayRept("", 0);
   Local number &langIndex;
   Local array of array of PT_WF_NOTIFICATION:NotificationAddress &langNotifyList = CreateArrayRept(CreateArrayRept(&NotifyAddress, 0), 0);
 
   /*Start: Custom Code To Populate CC Value*/
 
   Local array of PT_WF_NOTIFICATION:NotificationAddress &notifyCC;
   Local PT_WF_NOTIFICATION:NotificationAddress &FTNotifyAddressCC;
   Local string &opridCC, &emailCC, &oprDescCC, &lngCC, &SupID;
   Local array of string &langsCC = CreateArrayRept("", 0);
   Local number &langIndexCC;
   Local array of array of PT_WF_NOTIFICATION:NotificationAddress &FTlangNotifyListCC = CreateArrayRept(CreateArrayRept(&FTNotifyAddressCC, 0), 0);
   /*End: Custom Code To Populate CC Value*/
 
   &notifyTo = CreateArrayRept(&NotifyAddress, 0);
 
   For &i = 1 To &aryOpridTo_.Len
      &emailTo = %This.GetEmail(&aryOpridTo_ [&i]);
   
      If (All(&emailTo)) Then
         &oprDesc = %This.GetOprDescr(&aryOpridTo_ [&i], &lng);
         &NotifyAddress = create PT_WF_NOTIFICATION:NotificationAddress(&aryOpridTo_ [&i], &oprDesc, " ", &emailTo, "Email");
         rem Worklist Channel &NotifyAddress = create NotificationAddress(&aryOpridTo_ [&i], " ", " ", &emailTo, "Worklist");
         If (None(&lng)) Then
            &lng = %Language;
         End-If;
         &langIndex = &langs.Find(&lng);
         If (&langIndex > 0) Then
            &langNotifyList [&langIndex].Push(&NotifyAddress);
         Else
            &langs.Push(&lng);
            &notifyTo = CreateArrayRept(&NotifyAddress, 0);
            &notifyTo.Push(&NotifyAddress);
            &langNotifyList.Push(&notifyTo);
         End-If;
      End-If;
   
      /*Start: Custom Code To Populate CC Value*/
     
      &notifyCC = CreateArrayRept(&FTNotifyAddressCC, 0);
     
      For &i = 1 To &aryOpridTo_.Len
       
         rem SQLExec("SELECT OPRID FROM PSUSEREMAIL WHERE PRIMARY_EMAIL = 'Y' AND EMAILID = :1 ", &langNotifyList [&langIndex], &FTApproverOPRID);
         SQLExec("SELECT E.EMAILID,E.OPRID FROM PS_ROLEXLATOPR O,PSUSEREMAIL E WHERE O.ROLEUSER_SUPR=E.OPRID AND E.PRIMARY_EMAIL = 'Y' AND O.OPRID = :1", &aryOpridTo_ [&i], &emailCC, &SupID);
         rem &emailCC = %This.GetEmail(&aryOpridTo_ [&i]);
         If (All(&emailCC)) Then
            &oprDescCC = %This.GetOprDescr(&SupID, &lngCC);
            &FTNotifyAddressCC = create PT_WF_NOTIFICATION:NotificationAddress(&SupID, &oprDescCC, " ", &emailCC, "Email");
            If (None(&lngCC)) Then
               &lngCC = %Language;
            End-If;
            &langIndexCC = &langsCC.Find(&lngCC);
            If (&langIndexCC > 0) Then
               &FTlangNotifyListCC [&langIndexCC].Push(&FTNotifyAddressCC);
            Else
               &langsCC.Push(&lngCC);
               &notifyCC = CreateArrayRept(&FTNotifyAddressCC, 0);
               &notifyCC.Push(&FTNotifyAddressCC);
               &FTlangNotifyListCC.Push(&notifyCC);
            End-If;
         End-If;
       
      End-For;
     
      /*End: Custom Code To Populate CC Value*/
   
   
   
   End-For;
 
   Local number &templateIndex = &templateNames.Find(&templateID_);
   If (&templateIndex = 0) Then
      &NotifyTemplate = create PT_WF_NOTIFICATION:NotificationTemplate(" ", " ", &templateID_, "G");
      &templateNames.Push(&templateID_);
      &templates.Push(&NotifyTemplate);
   Else
      &NotifyTemplate = &templates [&templateIndex];
   End-If;
 
   For &langIndex = 1 To &langs.Len
      %This.currentLanguage = &langs [&langIndex];
      &aryValues = %This.LoadTemplateData(&pageURL_, &strSQLId_, &recThread_);
      &XMLVars = &NotifyTemplate.SetupGenericVars(&aryValues);
      &Status = &NotifyTemplate.GetAndExpandTemplate(%This.currentLanguage, &XMLVars);
      Local string &from = &from_;
      rem = %This.GetEmail(&from_);
      If (&Status) Then
         /* Send */
       
         &Notification = create PT_WF_NOTIFICATION:Notification(&from, %Date + %PerfTime, %Language);
         &Notification.NotifyTo = &langNotifyList [&langIndex];
       
         /*Start: Custom Code To Populate CC Value, You can use your own template name for escalations*/
         If &templateID_ = "Voucher Escalation" Then
           
            &Notification.NotifyCC = &FTlangNotifyListCC [&langIndex];
           
         End-If;
         /*End: Custom Code To Populate CC Value*/
         &Notification.Subject = &NotifyTemplate.Subject;
         &Notification.Message = &NotifyTemplate.Text;
         &Notification.Subject = Substitute(&Notification.Subject, "%NotificationPriority", &NotifyTemplate.Priority);
         &Notification.Message = Substitute(&Notification.Message, "%NotificationPriority", &NotifyTemplate.Priority);
         Evaluate &NotifyTemplate.SenderType
         When = "3" /* "Other" */
            &Notification.EmailReplyTo = &NotifyTemplate.SenderEmailID;
            Break;
         When = "2" /* System */
            &Notification.EmailReplyTo = %SMTPSender;
            Break;
            /* when = "1" is already assumed when the variable is set above */
         End-Evaluate;
       
         /* This property should be on each template to avoid sending all with one content-type */
         &Notification.ContentType = "Content-type: text/html; charset=UTF-8";
         &Notification.Send();
      Else
       
         Local EOAW_CORE:Utils &utils = GetUtilsSingleton();
         Local string &default = "Notification template (id " | &templateID_ | ") could not be expanded.";
         Local string &msg = MsgGetText(&utils.MSG_CATALOG, &utils.MSG_NOTIFICATION_FAILURE, &default, &templateID_);
         Local Exception &base = CreateException(&utils.MSG_CATALOG, &utils.MSG_NOTIFICATION_FAILURE, &default, &templateID_);
         throw create EOAW_CORE:EXCEPTIONS:SACError(&base, &msg);
      End-If;
   End-For;
end-method;

Monday, June 11, 2018

Migrate Generic Templates between databases

Generic Templates can be migrated from one database to another using Datamover export and import scripts. Which Template ID that are exported and imported can be controlled with WHERE clause.

1. Verify data to export, with SQL similar to this;
SELECT * FROM PS_WL_TEMPLATE_GEN WHERE WL_TEMPLATE_ID = 'custom template name';
SELECT * FROM PS_WL_TEMPL_GEN_TK WHERE WL_TEMPLATE_ID = 'custom template name';
SELECT * FROM PS_WL_TEMPL_GEN_RS WHERE WL_TEMPLATE_ID = 'custom template name';


2. Example Data Mover Export Script to export Generic Templates;
SET LOG C:\TEMP\GEN_TEMPLATE.LOG;
SET OUTPUT C:\TEMP\GEN_TEMPLATE.DAT;
EXPORT PS_WL_TEMPLATE_GEN WHERE WL_TEMPLATE_ID = 'custom template name';
EXPORT PS_WL_TEMPL_GEN_TK WHERE WL_TEMPLATE_ID = 'custom template name';
EXPORT PS_WL_TEMPL_GEN_RS WHERE WL_TEMPLATE_ID = 'custom template name';


3. Example Data Mover Import Script to import Generic Templates into another Database;

SET LOG C:\TEMP\DATAMOVE.LOG;
DELETE FROM PS_WL_TEMPLATE_GEN WHERE WL_TEMPLATE_ID = 'custom template name';
DELETE FROM PS_WL_TEMPL_GEN_TK WHERE WL_TEMPLATE_ID = 'custom template name';
DELETE FROM PS_WL_TEMPL_GEN_RS WHERE WL_TEMPLATE_ID = 'custom template name';

SET LOG C:\TEMP\IMP_TEMPLATE.LOG;
SET INPUT C:\TEMP\GEN_TEMPLATE.DAT;
SET NO SPACE;
SET NO RECORD;
SET NO INDEX;
IMPORT *;



4. Example of this running in a Demo system for Generic Template named 'THOMAS'.

EXPORT Script;
SET LOG D:\User\LThomas\3-1713987231\EXP_TEMPLATE.LOG;
SET OUTPUT D:\User\LThomas\3-1713987231\GEN_TEMPLATE.DAT;
EXPORT PS_WL_TEMPLATE_GEN WHERE WL_TEMPLATE_ID = 'THOMAS';
EXPORT PS_WL_TEMPL_GEN_TK WHERE WL_TEMPLATE_ID = 'THOMAS';
EXPORT PS_WL_TEMPL_GEN_RS WHERE WL_TEMPLATE_ID = 'THOMAS';

Started: Tue May 25 14:42:30 2010
Data Mover Release: 8.49.22
Database: Q900ZXYX (ENG)
Exporting WL_TEMPLATE_GEN
Export WL_TEMPLATE_GEN 1
Exporting WL_TEMPL_GEN_TK
Export WL_TEMPL_GEN_TK 1
Exporting WL_TEMPL_GEN_RS
Export WL_TEMPL_GEN_RS 0
Ended: Tue May 25 14:42:31 2010
Successful completion
Script Completed.


5. Example of this running in a Demo system for Generic Template named 'THOMAS'.

IMPORT Script;
SET LOG D:\User\LThomas\3-1713987231\DATAMOVE.LOG;
DELETE FROM PS_WL_TEMPLATE_GEN WHERE WL_TEMPLATE_ID = 'THOMAS';
DELETE FROM PS_WL_TEMPL_GEN_TK WHERE WL_TEMPLATE_ID = 'THOMAS';
DELETE FROM PS_WL_TEMPL_GEN_RS WHERE WL_TEMPLATE_ID = 'THOMAS';

SET LOG D:\User\LThomas\3-1713987231\IMP_TEMPLATE.LOG;
SET INPUT D:\User\LThomas\3-1713987231\GEN_TEMPLATE.DAT;
SET NO SPACE;
SET NO RECORD;
SET NO INDEX;
IMPORT *;

Started: Tue May 25 14:51:12 2010
Data Mover Release: 8.49.22
Database: Q900GXAE (ENG)
SQL Successful - DELETE FROM PS_WL_TEMPLATE_GEN WHERE WL_TEMPLATE_ID = 'THOMAS'
SQL Successful - DELETE FROM PS_WL_TEMPL_GEN_TK WHERE WL_TEMPLATE_ID = 'THOMAS'
SQL Successful - DELETE FROM PS_WL_TEMPL_GEN_RS WHERE WL_TEMPLATE_ID = 'THOMAS'
Ended: Tue May 25 14:51:12 2010
Successful completion
Started: Tue May 25 14:51:12 2010
Data Mover Release: 8.49.22
Database: Q900GXAE (ENG)
Input file: D:\User\LThomas\3-1713987231\GEN_TEMPLATE.DAT (ENG)
Commit done at end of record
Importing WL_TEMPLATE_GEN
Import WL_TEMPLATE_GEN 1
Records remaining: 2
Importing WL_TEMPL_GEN_TK
Import WL_TEMPL_GEN_TK 1
Records remaining: 1
Importing WL_TEMPL_GEN_RS
Import WL_TEMPL_GEN_RS 0
Ended: Tue May 25 14:51:13 2010
Successful completion
Script Completed.

Monday, April 30, 2018

Pages Used to Administer Content References

Page Name
Definition Name
Navigation
Usage
Content Ref Administration (content reference administration)
PORTAL_CREF_ADM
PeopleTools, Portal, Structure and Content, Portal Objects
Navigate to the Content References list and click Edit.. Or click Add Content Reference.
Add new content references or edit existing content references.
Content Reference Security
PORTAL_CREF_SEC
PeopleTools, Portal, Structure and Content, Portal Objects, Content Ref Administration, Security
Set content reference security.
User ID Queries
USER_QUERY
PeopleTools, Security, User Profiles, User Profiles, User ID Queries
Review content reference security by user.
Permission List Queries
PLIST_QUERIES
PeopleTools, Security, Permissions & Roles, Permission Lists, Permission List Queries
Review content reference security by permission list.
Role Queries
ROLE_QUERY
PeopleTools, Security, Permissions & Roles, Roles, Role Queries
Review content reference security by role.
Select a Content Reference or Content Reference Link
PORTAL_CREF_SELECT
PeopleTools, Portal, Structure and Content, Portal Objects
Navigate to the Content References list and click Add Content Reference Link.
Select a content reference or content reference link.
Content Reference Link Administration
PORTAL_CREF_LNK
  • Click a content reference link on the Content Reference or Content Reference Link page.
  • PeopleTools, Portal, Structure and Content, Portal Objects
    Navigate to the Content References list and click Create Link.
  • PeopleTools, Portal, Structure and Content, Portal Objects
    Navigate to the Content References list and click Edit for any content reference of usage type Target.
    Click Create Content Reference Link.
Add new or edit existing content reference links.
Related Links Group
PORTAL_RLNK_ADM
  • PeopleTools, Portal, Structure and Content, Portal Objects
    Navigate to the Content References list and click the Edit link.
  • Select the template name RELATEDLINKS_TEMPLATE.
    Enter RELLINK in the Name field of the Content Reference Attributes section.
    Enter a label for the attribute.
    Click the Edit Related Links link.
Create related links groups.
Security
PORTAL_CLINK_SEC
PeopleTools, Portal, Structure and Content, Portal Objects, Content Reference Link Administration, Security
Set content reference link security.

Thursday, April 26, 2018

Site Name Is Not Valid When Clicking Search Results

Tools VersionOn : 8.55 version, Elastic Search 

When searching with Elasticsearch in a test 9.2 we receive results but when clicking the result we are receiving the error ""Site name is not valid. check your syntax and try again." when clicking a result on the search results page. 

WorkAround:


Navigate to Integration Broker Nodes and sort by local. Check the Portal and Content URLs of each node marked local to verify the site name is in lower case for both.

Here are the steps to make it work after a change to the Portal or content URL's:
Make certain this change is made to ALL LOCAL NODES. For example, for HCM, this would need to be defined for PSFT_HR and HRMS nodes.

After you make the above changes, you will need to rebuild the search indices. Do this as follows:

A. Undeploy/Redeploy any Search Definitions that were built with incorrect URL's as follows:
  • Navigate to PeopleTools, Search Framework, Administration, Deploy/Delete Object
  • Check box next to the non-working Search Definition
  • Click 'Undeploy'
  • After it completes, check the box next to Search Definition and this time click 'Deploy'
B. Rebuild Search Index
  • Navigate to PeopleTools, Search Framework, Administration, Schedule Search Index
  • Bring up the Run Control needed to run a Full Index build and launch it.
C. After the "Build Search Index" process has completed, re-test and verify that issue is resolved.

This should fix the issue as the links were indexed with the prior entries.

Monday, April 23, 2018

How to disable "Personalize Page" link for all users? And Give Access to Adminstrator?

To disable "Personalize Page" link globally, please use the following steps 1. Navigate to Peopletools > Personalization > Personalization Options 2. Select "PPTL" for People Tools 3. Locate CUSTOMPGSET - Customize Page Settings 4. Set Option Default Value to N 5. Save If you would like to have administrate to override the global option, use the following steps 1. Navigate to Peopletools > Security > Permissions and Roles > Permission List 2. Open the permission list that only shared among the Adminstrator 3. At the Personalization tab, add a new row 4. Choose "PPTL" for Option Category Level, and "PS Internet Architecture" for Option Category Group 5. Click Edit link and select "Allow User Option" for Customize Page Settings row. 6. Click OK and Save 7. Go to Main Manu and select My Personalization 8. Click "Personalize General Options" 9. Set the Override value for "Customize Page Settings " and Click OK

How To Restrict Users From Adding Homepages or Tiles in Fluid Homepages

The Add To functionality (all of it not just parts) are determined by 3 things: 1. Does the component itself have the Add To functionality enabled in Component Properties (default is enabled): - Open component definition in App Designer - Access the component's Component Properties. - Click the "Fluid" tab - Check "Add To" option box to see if it's checked 2. Does the user have permission to access the iScript which performs the Add To functionality? Development stated the following code is checked specifically: --IsIScriptAuthorized("WEBLIB_PTNUI", "PT_BUTTON_PIN", "FieldFormula", "IScript_SavePin", %Action_UpdateDisplay); So one can check: - PeopleTools > Security > Permissions & Roles > Permission Lists - Open the user's individual permission lists - Go to the "Web Libraries" tab - See if there is permission given to: Web Library: WEBLIB_PTNUI Function: PT_BUTTON_PIN.FieldFormula.IScript_SavePin 3. The form factor of the device being used to access the application. The Add To functionality is disabled on the small form factor. So users accessing the application from a small form factor device (such as smartphones) will not see the Add To feature. The above will determine access to all 3 of "Add To Homepage", "Add To Favorites" and "Add To Navbar". There are no options at a more granular level to control each individual "Add To" item.

How to Hide Global Search Icon and Add To items in Fluid Navigation Header

On the Fluid landing page, the Global Search icon and the 'Add to' items on the Actions list can be hidden by removing security access to components PTSF_GBLSRCH_FLUID and PTSF_GLOBAL_SEARCH under menu PORTAL_ADMIN in permission list PTPT1000. On the Learning Home Dashboard page, it is more involved, since the Fluid landing page is a physical component whereas Classic Learner Home is a Content reference link. - To hide the Global Search icon - Going to PeopleTools > Portal > General Settings, then turning off "Display global search in header" removes the global search icon from the header. - To hide the 'Add to...' items from the Actions list - To remove access for users to the 'Add To...' items, you need to remove security access to point #2 in Doc ID 1983068.1 (see Related Knowledge). In other words, remove access to the iScript WEBLIB_PTNUI.PT_BUTTON_PIN.FieldFormula.IScript_SavePin Note: This hides all of the 'Add to...' items from the Actions list; there is currently no way to selectively choose which 'Add to...' items you hide/unhide, it is all or nothing. Source : Doc ID 2198358.1

Tuesday, April 22, 2014

Using Union All in PeopleSoft Query ( PSQuery )

When creating a PeopleSoft Query that uses a union, PeopleSoft will always use a union instead of a union all.
Using a Union statement causes the query to have all duplicate rows in the result set removed.  In some cases this is appropriate but in many cases it is not.  If another tool was being used, the Union statement would be changed to a Union All and then the duplicate rows would not be removed.
 PSQuery does not provide a builtin way to change the Union to Union All, but I will show you two ways you can accomplish this on a Microsoft SQL Server database.  ( This may work on Oracle or DB2 but I have not had a chance to test it )
 Option 1: add a NewID() field
This is by far the simpler of the two options. To Accomplish this:
  1. Right click on "Expressions" and choose "New Expressions"
  2. Type newid() in the box
  3. Click OK
  4. Add this new expression as a field to select. (click on the fields tab, expand the expressions so you see the newly created one and drag it over to where the fields are listed)
  5. Repeated for each of your queries in the union
This method is quick and easy with only one drawback.  Your query results will an extra column with text such as "37FCA8B1-E856-4C0D-8248-B4C417C35848" in it.  If you are displaying the results of the query via a Crystal Report or nVision report, then just don't display this field and your problem is solved.  If the end-user of this query is going to be using the PS Query tool and you do not want them to see this field, you should consider option 2 below.

Option 2: Hiding the union in a subselect
This method is more work but the results are great with no extra column.  I have only had a chance to test this on MSSQL, so I don't know if it will work on Oracle or DB2.  The main part of this workaround is to wrap the union that PSQUERY generates in a SubSelect and then force our own union all statement in it's place.  PSQuery provides some flexibility in what you can put in an expression statement and we will use that to our advantage
Step 1:Create the first query
Create your first query in your union as usual
Step 2:Add a criteria at the bottom
Add an additional criteria at the bottom of your criteria list.  Pick a field on the left hand side of the criteria and on the right side choose expression.  If using an aggregate in your query you would need to add a new having criteria instead.
Step 3:Creating the first query expression
This is the tricky part.  In the expression you just added.  Type the Alias.Fieldname of the field you are selected, then type UNION ALL  SELECT null,null where not exists (select 'x' 
You must include the same number of nulls in your select statement here as in your first query.  ( I have 2 in this example )




Step 4:  Create the Second Query
Create your second query in the union as you normally would
Step 5:  Create a new expression in the second query
Create a new blank expression in the second query.  The datatype of this expression should match the datatype of the first field in your Fields to display
Step 6:  
In the expression enter 
null where 1 = 2
Union all
Select <FirstFieldName>
Replace <FirstFieldName> with the Alias.FirstFieldname in your Fields list
Step 7: Remove the first field and replace it will the expression
When you look at your sql you should be something like below
SELECT A.BUSINESS_UNIT, A.ORDER_NO
  FROM PS_ORD_LINE A
  WHERE A.ORDER_NO =  A.ORDER_N
UNION ALL 
     SELECT null,null where not exists (select 'x' UNION SELECT  null where 1 = 2 )
UNION ALL SELECT  B.BUSINESS_UNIT, B.ORDER_NO
  FROM PS_ORD_LINE B
 You can do this trick for as many unions as your need.

Tuesday, March 11, 2014

Excel 2010 Shortcuts

minus1. Navigate Inside Worksheets
Arrow KeysMove one cell up, down, left, or right in a worksheet.
Page Down/Page UpMove one screen down / one screen up in a worksheet.
Alt+Page Down/Alt+Page UpMove one screen to the right / to the left in a worksheet.
Tab/Shift+TabMove one cell to the right / to the left in a worksheet.
Ctrl+Arrow KeysMove to the edge of next data region (cells that contains data)
HomeMove to the beginning of a row in a worksheet.
Ctrl+HomeMove to the beginning of a worksheet.
Ctrl+EndMove to the last cell with content on a worksheet.
Ctrl+fDisplay the Find and Replace dialog box (with Find selected).
Ctrl+hDisplay the Find and Replace dialog box (with Replace selected).
Shift+F4Repeat last find.
Ctrl+g (or f5)Display the 'Go To' dialog box.
Ctrl+Arrow Left/Ctrl+Arrow RightInside a cell: Move one word to the left / to the right.
Home/EndInside a cell: Move to the beginning / to the end of a cell entry.
Alt+Arrow DownDisplay the AutoComplete list e.g. in cell with dropdowns or autofilter.
EndTurn 'End' mode on. In End mode, press arrow keys to move to the next
nonblank cell in the same column or row as the active cell. From here
use arrow keys to move by blocks of data, home to move to last cell,
or enter to move to the last cell to the right.

minus2. Work with Data Selections
minus
Select Cells
Shift+SpaceSelect the entire row.
Ctrl+SpaceSelect the entire column.
Ctrl+Shift+* (asterisk)Select the current region around the active cell.
Ctrl+a (or ctrl+Shift+spacebar)Select the entire worksheet or the data-containing area. Pressing ctrl+a 
a second time then selects entire worksheet.
Ctrl+Shift+Page UpSelect the current and previous sheet in a workbook.
Ctrl+Shift+oSelect all cells with comments.
Shift+Arrow KeysExtend the selection by one cell.
Ctrl+Shift+Arrow KeyExtend the selection to the last cell with content in row or column.
Shift+Page Down/Shift+Page UpExtend the selection down one screen /up one screen.
Shift+HomeExtend the selection to the beginning of the row.
Ctrl+Shift+HomeExtend the selection to the beginning of the worksheet.
Ctrl+Shift+EndExtend the selection to the last used cell on the worksheet (lower-right corner).
minusManage Active Selections
F8Turn on extension of selection with arrow keys without having to keep pressing shift.
Shift+F8Add another (adjacent or non-adjacent) range of cells to the selection. Use arrow keys and shift+arrow keys to add to selection.
Shift+BackspaceSelect only the active cell when multiple cells are selected.
Ctrl+BackspaceShow active cell within selection.
Ctrl+. (period)Move clockwise to the next corner of the selection.
Enter/Shift+EnterMove active cell down / up in a selection.
Tab/Shift+TabMove active cell right / left in a selection.
Ctrl+Alt+Arrow Right/Ctrl+Alt+Arrow LeftMove to the right / to the left between non-adjacent selections
(with multiple ranges selected).
EscCancel Selection.
minusSelect inside cells
Shift+Arrow Left/Shift+Arrow RightSelect or unselect one character to the left / to the right.
Ctrl+Shift+Arrow Left/Ctrl+Shift+Arrow RightSelect or unselect one word to the left / to the right.
Shift+Home/Shift+EndSelect from the insertion point to the beginning / to the end of the cell.
▲ up

minus3. Insert and Edit Data
minusUndo / Redo Shortcuts
Ctrl+zUndo last action (multiple levels).
Ctrl+yRedo last action (multiple levels).
minusWork with Clipboard
Ctrl+cCopy contents of selected cells.
Ctrl+xCut contents of selected cells.
Ctrl+vPaste content from clipboard into selected cell.
Ctrl+Alt+vIf data exists in clipboard: Display the Paste Special dialog box.
Ctrl+Shift+[+]If data exists in clipboard: Display the Insert dialog box to insert blank cells.
minusEdit Inside Cells
F2Edit the active cell with cursor at end of the line.
Alt+EnterStart a new line in the same cell.
EnterComplete a cell entry and move down in the selection.
With multiple cells selected: fill cell range with current cell.
Shift+EnterComplete a cell entry and move up in the selection.
Tab/Shift+TabComplete a cell entry and move to the right / to the left in the selection.
EscCancel a cell entry.
BackspaceDelete the character to the left of the insertion point, or delete the selection.
DeleteDelete the character to the right of the insertion point, or delete the selection.
Ctrl+DeleteDelete text to the end of the line.
Ctrl+; (semicolon)Insert current date.
Ctrl+Shift+: (colon)Insert current time.
Ctrl+tShow all content as standard numbers. (So 14:15 becomes 14.25 etc for the entire file)
To undo press ctrl + t again
minusEdit Active or Selected Cells
Ctrl+dFill complete cell down (Copy above cell).
Ctrl+rFill complete cell to the right (Copy cell from the left).
Ctrl+"Fill cell values down and edit (Copy above cell values).
Ctrl+' (apostrophe)Fill cell formulas down and edit (Copy above cell formulas).
Ctrl+lInsert a table (display Create Table dialog box).
Ctrl+-Delete Cell/Row/Column Menu
Ctrl+- with row / column selectedDelete row / delete column.
Ctrl+Shift++Insert Cell/Row/Column Menu
Ctrl+Shift++ with row / column selectedInsert row/ insert column.
Shift+F2Insert / Edit a cell comment.
Shift+f10, then mDelete comment.
Alt+F1Create and insert chart with data in current range as embedded Chart Object.
F11Create and insert chart with data in current range in a separate Chart sheet.
Ctrl+kInsert a hyperlink.
enter (in a cell with a hyperlink)Activate a hyperlink.
minusHide and Show Elements
Ctrl+9Hide the selected rows.
Ctrl+Shift+9Unhide any hidden rows within the selection.
Ctrl+0 (zero)Hide the selected columns.
Ctrl+Shift+0 (zero)Unhide any hidden columns within the selection*.
Ctrl+` (grave accent)Alternate between displaying cell values and displaying cell formulas.
Accent grave /not a quotation mark.
Alt+Shift+Arrow RightGroup rows or columns.
Alt+Shift+Arrow LeftUngroup rows or columns.
Ctrl+6Alternate between hiding and displaying objects.
Ctrl+8Display or hides the outline symbols.
Ctrl+6Alternate between hiding objects, displaying objects, and displaying
placeholders for objects.

minusAdjust Column Width and Row Height
Note: there are no default shortcuts for this, but workaround through access keys from previous versions
Alt+o, caAdjust Column width to fit content. Select complete column with Ctrl+Space first,
otherwise column adjusts to content of current cell). Remember Format, Column Adjust.
Alt+o, cwAdjust Columns width to specific value: Option, Cow, width
Alt+o, raAdjust Row height to fit content: Option, Row, Adjust
Alt+o, reAdjust Row height to specific value: Option, Row, Height
▲ up

minus4. Format Data
minusFormat Cells
Ctrl+1Format cells dialog.
Ctrl+b (or ctrl+2)Apply or remove bold formatting.
Ctrl+i (or ctrl+3)Apply or remove italic formatting.
Ctrl+u (or ctrl+4)Apply or remove an underline.
Ctrl+5Apply or remove strikethrough formatting.
Ctrl+Shift+fDisplay the Format Cells with Fonts Tab active. Press tab 3x to get to font-size.
Used to be ctrl+shift+p, but that seems just get to the Font Tab in 2010.
Alt+' (apostrophe / single quote)Display the Style dialog box.
minusNumber Formats
Ctrl+Shift+$Apply the Currency format with two decimal places.
Ctrl+Shift+~Apply the General number format.
Ctrl+Shift+%Apply the Percentage format with no decimal places.
Ctrl+Shift+#Apply the Date format with the day, month, and year.
Ctrl+Shift+@Apply the Time format with the hour and minute, and indicate A.M. or P.M.
Ctrl+Shift+!Apply the Number format with two decimal places, thousands separator, and
minus sign (-) for negative values.
Ctrl+Shift+^Apply the Scientific number format with two decimal places.
F4Repeat last formatting action: Apply previously applied Cell Formatting to a different Cell
minusApply Borders to Cells
Ctrl+Shift+&Apply outline border from cell or selection
Ctrl+Shift+_ (underscore)Remove outline borders from cell or selection
Ctrl+1, then Ctrl+Arrow Right/Arrow LeftAccess border menu in 'Format Cell' dialog. Once border was selected,
it will show up directly on the next Ctrl+1
Alt+t*Set top border
Alt+b*Set bottom Border
Alt+l*Set left Border
Alt+r*Set right Border
Alt+d*Set diagonal and down border
Alt+u*Set diagonal and up border
*In Cell Format in 'Border' Dialog Window
minusAlign Cells
Alt+h, arAlign Right
Alt+h, acAlign Center
Alt+h, alAlign Left
▲ up

minus5. Formulas and Names
minusFormulas
=Start a formula.
Alt+=Insert the AutoSum formula.
Shift+F3Display the Insert Function dialog box.
Ctrl+aDisplay Formula Window after typing formula name.
Ctrl+Shift+aInsert Arguments in formula after typing formula name. .
Shift+F3Insert a function into a formula .
Ctrl+Shift+EnterEnter a formula as an array formula.
F4After typing cell reference (e.g. =E3) makes reference absolute (=$E$4)
F9Calculate all worksheets in all open workbooks.
Shift+F9Calculate the active worksheet.
Ctrl+Alt+F9Calculate all worksheets in all open workbooks, regardless of whether
they have changed since the last calculation.
Ctrl+Alt+Shift+F9Recheck dependent formulas, and then calculates all cells in all open workbooks,
including cells not marked as needing to be calculated.
Ctrl+Shift+uToggle expand or collapse formula bar.
Ctrl+`Toggle Show formula in cell instead of values
minusNames
Ctrl+F3Define a name or dialog.
Ctrl+Shift+F3Create names from row and column labels.
F3Paste a defined name into a formula.
▲ up

minus6. Manage Multipe Worksheets
Shortcuts to delete, rename, or move worksheets are based on the old Excel 2003 menus which still work in Excel 2010.
Shift+F11/Alt+Shift+F1Insert a new worksheet in current workbook.
Ctrl+Page Down/Ctrl+Page UpMove to the next / previous worksheet in current workbook.
Shift+Ctrl+Page Down/Shift+Ctrl+Page UpSelect the current and next sheet(s) / select and previous sheet(s).
Alt+o then h rRename current worksheet (format, sheet, rename)
Alt+e then lDelete current worksheet (Edit, delete)
Alt+e then mMove current worksheet (Edit, move)
▲ up

minus7. Manage Multiple Workbooks
F6/Shift+F6Move to the next pane / previous pane in a workbook that has been split.
Ctrl+F4Close the selected workbook window.
Ctrl+nCreate a new blank workbook (Excel File)
Ctrl+Tab/Ctrl+Shift+TabMove to next / previous workbook window.
Alt+SpaceDisplay the Control menu for Main Excel window.
Ctrl+F9Minimize current workbook window to an icon. Also restores ('un-maximizes')
all workbook windows.
Ctrl+F10Maximize or restores the selected workbook window.
Ctrl+F7Move Workbook Windows which are not maximized.
Ctrl+F8Perform size command for workbook windows which are not maximzed.
Alt+F4Close Excel.
▲ up

minus8. Various Excel Features
Ctrl+oOpen File.
Ctrl+sSave the active file with its current file name, location, and file format.
F12Display the Save As dialog box.
f10 (or alt)Turn key tips on or off.
Ctrl+pPrint File (Opens print menu).
F1Display the Excel Help task pane.
F7Display the Spelling dialog box.
Shift+F7Display the Thesaurus dialog box.
Alt+F8Display the Macro dialog box.
Alt+F11Open the Visual Basic Editor to create Macros.
▲ up

minus9. Work with the Excel Ribbon
Ctrl+F1Minimize or restore the Ribbon.s
Alt/F10Select the active tab of the Ribbon and activate the access keys. Press either of
these keys again to move back to the document and cancel the access keys.
and then arrow left or arrow right
Shift+F10Display the shortcut menu for the selected command.
Space/EnterActivate the selected command or control in the Ribbon, Open the selected menu
or gallery in the Ribbon..
EnterFinish modifying a value in a control in the Ribbon, and move focus back to the document.
F1Get help on the selected command or control in the Ribbon.
 (If no Help topic is associated with the selected command, the Help table of contents for
that program is shown instead.)
▲ up

minus10. Data Forms
Tab/Shift+TabMove to the next / previous field which can be edited.
Enter/Shift+EnterMove to the first field in the next / previous record.
Page Down/Page UpMove to the same field 10 records forward / back.
Ctrl+Page DownMove to a new record.
Ctrl+Page UpMove to the first record.
Home/EndMove to the beginning / end of a field.
▲ up

minus11. Pivot Tables
Arrow KeysNavigate inside Pivot tables.
Home/EndSelect the first / last visible item in the list.
Alt+cMove the selected field into the Column area.
Alt+dMove the selected field into the Data area.
Alt+lDisplay the PivotTable Field dialog box.
Alt+pMove the selected field into the Page area.
Alt+rMove the selected field into the Row area.
Ctrl+Shift+* (asterisk)Select the entire PivotTable report.
arrow keys to select the cell that contains the field, and thenalt+Arrow DownDisplay the list for the current field in a PivotTable report.
arrow keys to select the page field in a PivotChart report, and then alt+Arrow DownDisplay the list for the current page field in a PivotChart report.
EnterDisplay the selected item.
SpaceSelect or clear a check box in the list.
Ctrl+tab ctrl+Shift+Tabselect the PivotTable toolbar.
enter then arrow down /Arrow UpOn a field button: select the area you want to move the selected field to.
Alt+Shift+Arrow RightGroup selected PivotTable items.
Alt+Shift+Arrow LeftUngroup selected PivotTable items.
▲ up

minus12. The Rest
minusDialog Boxes
Arrow KeysMove between options in the active drop-down list box or between some options
in a group of options.
Ctrl+Tab/Ctrl+Shift+TabSwitch to the next/ previous tab in dialog box.
SpaceIn a dialog box: perform the action for the selected button, or select/clear a check box.
Tab/Shift+TabMove to the next / previous option.
a ... zMove to an option in a drop-down list box starting with the letter
Alt+a ... alt+zSelect an option, or select or clear a check box.
Alt+Arrow DownOpen the selected drop-down list box.
EnterPerform the action assigned to the default command button in the dialog box.
EscCancel the command and close the dialog box.
minusAuto Filter
Alt+Arrow DownOn the field with column head, display the AutoFilter list for the current column .
Arrow Down/Arrow UpSelect the next item / previous item in the AutoFilter list.
Alt+Arrow UpClose the AutoFilter list for the current column.
Home/EndSelect the first item / last item in the AutoFilter list.
EnterFilter the list by using the selected item in the AutoFilter list.
Ctrl + Shift + LApply filter on selected column headings.
minusWork with Smart Art Graphics
Arrow KeysSelect elements.
EscRemove Focus from Selection.
F2Edit Selection Text in if possible (in formula bar).