To pin an excel document to the task bar in Windows 11:
- Go to (left click) start > settings > personalization > start
- Turn on "Show recently opened items in Start, Jump Lists, and File Explorer"
- Open the excel document
- Pin the excel app icon to the task bar (if not already done)
- Right click excel app icon on task bar
- Pin the excel document icon as you did in Windows 10
- Optionally turn off "Show recently opened items in Start, Jump Lists, and File Explorer". The pinned excel document icon will remain.
Apparently, "Show recently opened items in Start, Jump Lists, and File Explorer" is off by default when Windows 11 is first installed if it was off in Windows 10.