Sheet names in Excel documents
Idea shared by new user - August 21 at 11:35 AM
Completed
We have customers who really want to see names of the sheets in document. Right now, there is no indication what sheet you are looking for. Ideally, we like to have option to put it to page header so every page will have this information.

2 Replies

Reply to Thread
0
Is there any way we can have it implemented? Or giving us event hook to implement desired functionality? This is pressing issue for our customers, as it's extremely difficult to review large Excels without knowing what sheet you are looking on
0
Cem Alacayir Replied
Employee Post
This is now possible with new version:

Version 4.9.0 - September 12, 2019

  • Added: RenderLeftHeader, RenderCenterHeader, RenderRightHeader, RenderLeftFooter, RenderCenterFooter and RenderRightFooterproperties to SpreadsheetInputOptions. Please refer to updated docs for special script and format codes that can be used forheader or footer strings. For example, "&A" prints the name of the workbook tab (worksheet name).

For viewer, you can use it like this:

documentViewer.InputOptions.Add(
  new SpreadsheetInputOptions
  {
    RenderLeftHeader = "Sheet name: &A"
  }
);

Or for converter like this:

var inputOptions = new SpreadsheetInputOptions
{
  RenderLeftHeader = "Sheet name: &A"
};

DocumentConverter.Convert(inputDocument, inputOptions, outputDocument);

The following special script and format codes can be included as a part of the header and footer properties:

Script codeDescription
&DPrints the current date.
&TPrints the current time.
&FPrints the name of the document.
&APrints the name of the workbook tab (worksheet name).
&PPrints the page number.
&P+numberPrints the page number plus the specified number. E.g. &P+1
&P-numberPrints the page number minus the specified number.E.g. &P-1
&&Prints a single ampersand.
&NPrints the total number of pages in the document.
&ZPrints the file path.

Format codeDescription
&ETurns double-underline printing on or off.
&XTurns superscript printing on or off.
&YTurns subscript printing on or off.
&BTurns bold printing on or off.
&ITurns italic printing on or off.
&UTurns underline printing on or off.
&STurns strike-through printing on or off.
&"font-name"Prints the characters that follow in the specified font. Be sure to include the double quotation marks. E.g. &"Arial", &"Arial,Bold"
&nnPrints the characters that follow in the specified font size. Use a two-digit number to specify a size in points. E.g. &14
&colorPrints the characters in the specified color. User supplies a hexadecimal color value. E.g. &FF0000 (red)

Reference:

Reply to Thread