IXlsPageSetup
COM interface ( getting help with interfaces )

 

interface IXlsPageSetup : IDispatch
{

  [id(1), propput] HRESULT PrintArea([in]BSTR cellrange);
  [id(1), propget] HRESULT PrintArea([out,retval]BSTR* cellrange);
  [id(2)         ] HRESULT SetMargins([in]double left, [in]double top, 
                                      [in]double right, [in]double bottom, 
                                      [in]double header, [in]double footer);
  [id(3), propput] HRESULT PageOrientation([in]BOOL portrait);
  [id(3), propget] HRESULT PageOrientation([out, retval]BOOL* portrait);
  [id(4), propput] HRESULT Scale([in]int printedScale);
  [id(4), propget] HRESULT Scale([out, retval]int* printedScale);
  [id(5)         ] HRESULT SetFitWidth([in]int width, [in]int height);
  [id(6), propput] HRESULT PageHeader([in]BSTR docheader);
  [id(6), propget] HRESULT PageHeader([out, retval]BSTR* docheader);
  [id(7), propput] HRESULT PageFooter([in]BSTR docfooter);
  [id(7), propget] HRESULT PageFooter([out, retval]BSTR* docfooter);
  [id(8), propput] HRESULT PrintGridlines([in]BOOL gridlines);
  [id(8), propget] HRESULT PrintGridlines([out, retval]BOOL* gridlines);
  [id(9), propput] HRESULT PaperSize([in]BSTR papersize);
  [id(9), propget] HRESULT PaperSize([out, retval]BSTR* papersize);
  [id(10),propput] HRESULT RepeatTitles([in]BSTR cellrange);
  [id(11),propput] HRESULT CenterHorizontally([in]BOOL centerhorizontally);
  [id(11),propget] HRESULT CenterHorizontally([out, retval]BOOL* centerhorizontally);
  [id(12),propput] HRESULT CenterVertically([in]BOOL centervertically);
  [id(12),propget] HRESULT CenterVertically([out, retval]BOOL* centervertically);
  [id(13),propget] HRESULT RepeatRows([out, retval]BSTR* repeatrows);
  [id(14),propget] HRESULT RepeatColumns([out, retval]BSTR* repeatcolumns);
  [id(15),propget] HRESULT MarginLeft([out, retval]double* marginleft);
  [id(16),propget] HRESULT MarginTop([out, retval]double* margintop);
  [id(17),propget] HRESULT MarginRight([out, retval]double* marginright);
  [id(18),propget] HRESULT MarginBottom([out, retval]double* marginbottom);
  [id(19),propget] HRESULT MarginHeader([out, retval]double* marginheader);
  [id(20),propget] HRESULT MarginFooter([out, retval]double* marginfooter);
  [id(21),propget] HRESULT FirstPageNumber([out, retval]int* pagenumber);
  [id(21),propput] HRESULT FirstPageNumber([in]int pagenumber);
  [id(22),propput] HRESULT PageBreakPreviewMode([in]BOOL previewmode);
  [id(23),propput] HRESULT ShowGridlines([in]BOOL gridlines);
  [id(23),propget] HRESULT ShowGridlines([out, retval]BOOL* gridlines);
  [id(24),propput] HRESULT PreviewScale([in]int previewScale);
  [id(24),propget] HRESULT PreviewScale([out, retval]int* previewScale);
  [id(25),propget] HRESULT GridColor([out, retval] int* nRGB);
  [id(25),propput] HRESULT GridColor([in]int nRGB);
  [id(26),       ] HRESULT CopyTo([in]IXlsPageSetup* destPageSetup);
  [id(27),propput] HRESULT PageEvenHeader([in]BSTR docheader);
  [id(27),propget] HRESULT PageEvenHeader([out, retval]BSTR* docheader);
  [id(28),propput] HRESULT PageEvenFooter([in]BSTR docfooter);
  [id(28),propget] HRESULT PageEvenFooter([out, retval]BSTR* docfooter);
  [id(29),propput] HRESULT PageFirstHeader([in]BSTR docheader);
  [id(29),propget] HRESULT PageFirstHeader([out, retval]BSTR* docheader);
  [id(30),propput] HRESULT PageFirstFooter([in]BSTR docfooter);
  [id(30),propget] HRESULT PageFirstFooter([out, retval]BSTR* docfooter);
  [id(31),propput] HRESULT PaperSizeForPrinter([in]BSTR printerName, [in]BSTR papersize);
  [id(32),propput] HRESULT PageNumberLeftToRight([in]BOOL pageOrder);
  [id(32),propget] HRESULT PageNumberLeftToRight([out, retval]BOOL* pageOrder);

}

 

HRESULT PrintArea([in]BSTR cellrange);
defines the print area for the current worksheet. The print area is a subset of the worksheet whose content is printed in whatever print job. The cellrange parameter is passed using the regular RxCxx:RyCyy form or Ax:Ax, where each block of cell is separated by a semi-colon. Example : R1C1:R1C2;R3C1:R3C2;A3:B5.

HRESULT PrintArea([out,retval]BSTR* cellrange);
returns the print area for the current worksheet. The cellrange parameter is passed using the regular RxCxx:RyCyy form or Ax:Ax, where each block of cell is separated by a semi-colon. Example : R1C1:R1C2;R3C1:R3C2;A3:B5.

HRESULT SetMargins([in]double left, [in]double top, [in]double right, [in]double bottom, [in]double header, [in]double footer);
defines the page margins for the current worksheet. The unit is the centimeter. Default values are 2.0, 2.0, 2.5, 2.5, 1.3, 1.3.

HRESULT PageOrientation([in]BOOL portrait);
defines the orientation. If true, then the page is portrait (vertically) oriented, otherwise it's in landscape mode. Default value is portrait.

HRESULT PageOrientation([out, retval]BOOL* portrait);
returns the orientation. If true, then the page is portrait (vertically) oriented, otherwise it's in landscape mode. Default value is portrait.

HRESULT Scale([in]int printedScale);
defines the scale of printed pages. Default value is 100 (100%).

HRESULT Scale([out, retval]int* printedScale);
returns the scale of printed pages. Default value is 100 (100%). Defaults to scaling as opposed to fit to width/height.

HRESULT SetFitWidth([in]int width, [in]int height);
defines the number of pages it should be fit per the width and the height instead of using scaling. Default values are 1 and 1.

HRESULT PageHeader([in]BSTR docheader);
defines the page header of the current worksheet. Excel limits it to less than 256 characters.

HRESULT PageHeader([out, retval]BSTR* docheader);
retrieves the page header of the current worksheet.

HRESULT PageFooter([in]BSTR docfooter);
defines the page footer of the current worksheet. Excel limits it to less than 256 characters.

HRESULT PageFooter([out, retval]BSTR* docfooter);
retrieves the page footer of the current worksheet.

HRESULT PrintGridlines([in]BOOL gridlines);
sets whether or not the grid lines should be printed.

HRESULT PrintGridlines([out, retval]BOOL* gridlines);
retrieves whether or not the grid lines should be printed.

HRESULT PaperSize([in]BSTR papersize);
sets the printer paper size. Examples are : A4, LETTER. Supported formats are : .
  "LETTER",               /* Letter 8 1/2 x 11 in               */
  "LETTERSMALL",          /* Letter Small 8 1/2 x 11 in         */
  "TABLOID",              /* Tabloid 11 x 17 in                 */
  "LEDGER",               /* Ledger 17 x 11 in                  */
  "LEGAL",                /* Legal 8 1/2 x 14 in                */
  "STATEMENT",            /* Statement 5 1/2 x 8 1/2 in         */
  "EXECUTIVE",            /* Executive 7 1/4 x 10 1/2 in        */
  "A3",                   /* A3 297 x 420 mm                    */
  "A4",                   /* A4 210 x 297 mm                    */
  "A4SMALL",              /* A4 Small 210 x 297 mm              */
  "A5",                   /* A5 148 x 210 mm                    */
  "B4",                   /* B4 (JIS) 250 x 354                 */
  "B5",                   /* B5 (JIS) 182 x 257 mm              */
  "FOLIO",                /* Folio 8 1/2 x 13 in                */
  "QUARTO",               /* Quarto 215 x 275 mm                */
  "10X14",                /* 10x14 in                           */
  "11X17",                /* 11x17 in                           */
  "NOTE",                 /* Note 8 1/2 x 11 in                 */
  "ENV_9",                /* Envelope #9 3 7/8 x 8 7/8          */
  "ENV_10",               /* Envelope #10 4 1/8 x 9 1/2         */
  "ENV_11",               /* Envelope #11 4 1/2 x 10 3/8        */
  "ENV_12",               /* Envelope #12 4 \276 x 11           */
  "ENV_14",               /* Envelope #14 5 x 11 1/2            */
  "CSHEET",               /* C size sheet                       */
  "DSHEET",               /* D size sheet                       */
  "ESHEET",               /* E size sheet                       */
  "ENV_DL",               /* Envelope DL 110 x 220mm            */
  "ENV_C5",               /* Envelope C5 162 x 229 mm           */
  "ENV_C3",               /* Envelope C3  324 x 458 mm          */
  "ENV_C4",               /* Envelope C4  229 x 324 mm          */
  "ENV_C6",               /* Envelope C6  114 x 162 mm          */
  "ENV_C65",              /* Envelope C65 114 x 229 mm          */
  "ENV_B4",               /* Envelope B4  250 x 353 mm          */
  "ENV_B5",               /* Envelope B5  176 x 250 mm          */
  "ENV_B6",               /* Envelope B6  176 x 125 mm          */
  "ENV_ITALY",            /* Envelope 110 x 230 mm              */
  "ENV_MONARCH",          /* Envelope Monarch 3.875 x 7.5 in    */
  "ENV_PERSONAL",         /* 6 3/4 Envelope 3 5/8 x 6 1/2 in    */
  "FANFOLD_US",           /* US Std Fanfold 14 7/8 x 11 in      */
  "FANFOLD_STD_GERMAN",   /* German Std Fanfold 8 1/2 x 12 in   */
  "FANFOLD_LGL_GERMAN",   /* German Legal Fanfold 8 1/2 x 13 in */
  "ISO_B4",               /* B4 (ISO) 250 x 353 mm              */
  "JAPANESE_POSTCARD",    /* Japanese Postcard 100 x 148 mm     */
  "9X11",                 /* 9 x 11 in                          */
  "10X11",                /* 10 x 11 in                         */
  "15X11",                /* 15 x 11 in                         */
  "ENV_INVITE",           /* Envelope Invite 220 x 220 mm       */
  "RESERVED_48",          /* RESERVED--DO NOT USE               */
  "RESERVED_49",          /* RESERVED--DO NOT USE               */
  "LETTER_EXTRA",         /* Letter Extra 9 \275 x 12 in        */
  "LEGAL_EXTRA",          /* Legal Extra 9 \275 x 15 in         */
  "TABLOID_EXTRA",        /* Tabloid Extra 11.69 x 18 in        */
  "A4_EXTRA",             /* A4 Extra 9.27 x 12.69 in           */
  "LETTER_TRANSVERSE",    /* Letter Transverse 8 \275 x 11 in   */
  "A4_TRANSVERSE",        /* A4 Transverse 210 x 297 mm         */
  "LETTER_EXTRA_TRANSVERSE", /* Letter Extra Transverse 9\275 x 12 in */
  "A_PLUS",               /* SuperA/SuperA/A4 227 x 356 mm      */
  "B_PLUS",               /* SuperB/SuperB/A3 305 x 487 mm      */
  "LETTER_PLUS",          /* Letter Plus 8.5 x 12.69 in         */
  "A4_PLUS",              /* A4 Plus 210 x 330 mm               */
  "A5_TRANSVERSE",        /* A5 Transverse 148 x 210 mm         */
  "B5_TRANSVERSE",        /* B5 (JIS) Transverse 182 x 257 mm   */
  "A3_EXTRA",             /* A3 Extra 322 x 445 mm              */
  "A5_EXTRA",             /* A5 Extra 174 x 235 mm              */
  "B5_EXTRA",             /* B5 (ISO) Extra 201 x 276 mm        */
  "A2",                   /* A2 420 x 594 mm                    */
  "A3_TRANSVERSE",        /* A3 Transverse 297 x 420 mm         */
  "A3_EXTRA_TRANSVERSE",  /* A3 Extra Transverse 322 x 445 mm   */
  "DBL_JAPANESE_POSTCARD",/* Japanese Double Postcard 200 x 148 mm */
  "A6",                   /* A6 105 x 148 mm                 */
  "JENV_KAKU2",           /* Japanese Envelope Kaku #2       */
  "JENV_KAKU3",           /* Japanese Envelope Kaku #3       */
  "JENV_CHOU3",           /* Japanese Envelope Chou #3       */
  "JENV_CHOU4",           /* Japanese Envelope Chou #4       */
  "LETTER_ROTATED",       /* Letter Rotated 11 x 8 1/2 11 in */
  "A3_ROTATED",           /* A3 Rotated 420 x 297 mm         */
  "A4_ROTATED",           /* A4 Rotated 297 x 210 mm         */
  "A5_ROTATED",           /* A5 Rotated 210 x 148 mm         */
  "B4_JIS_ROTATED",       /* B4 (JIS) Rotated 364 x 257 mm   */
  "B5_JIS_ROTATED",       /* B5 (JIS) Rotated 257 x 182 mm   */
  "JAPANESE_POSTCARD_ROTATED", /* Japanese Postcard Rotated 148 x 100 mm */
  "DBL_JAPANESE_POSTCARD_ROTATED", /* Double Japanese Postcard Rotated 148 x 200 mm */
  "A6_ROTATED",           /* A6 Rotated 148 x 105 mm         */
  "JENV_KAKU2_ROTATED",   /* Japanese Envelope Kaku #2 Rotated */
  "JENV_KAKU3_ROTATED",   /* Japanese Envelope Kaku #3 Rotated */
  "JENV_CHOU3_ROTATED",   /* Japanese Envelope Chou #3 Rotated */
  "JENV_CHOU4_ROTATED",   /* Japanese Envelope Chou #4 Rotated */
  "B6_JIS",               /* B6 (JIS) 128 x 182 mm           */
  "B6_JIS_ROTATED",       /* B6 (JIS) Rotated 182 x 128 mm   */
  "12X11",                /* 12 x 11 in                      */
  "JENV_YOU4",            /* Japanese Envelope You #4        */
  "JENV_YOU4_ROTATED",    /* Japanese Envelope You #4 Rotated*/
  "P16K",                 /* PRC 16K 146 x 215 mm            */
  "P32K",                 /* PRC 32K 97 x 151 mm             */
  "P32KBIG",              /* PRC 32K(Big) 97 x 151 mm        */
  "PENV_1",               /* PRC Envelope #1 102 x 165 mm    */
  "PENV_2",               /* PRC Envelope #2 102 x 176 mm    */
  "PENV_3",               /* PRC Envelope #3 125 x 176 mm    */
  "PENV_4",               /* PRC Envelope #4 110 x 208 mm    */
  "PENV_5",               /* PRC Envelope #5 110 x 220 mm    */
  "PENV_6",               /* PRC Envelope #6 120 x 230 mm    */
  "PENV_7",               /* PRC Envelope #7 160 x 230 mm    */
  "PENV_8",               /* PRC Envelope #8 120 x 309 mm    */
  "PENV_9",               /* PRC Envelope #9 229 x 324 mm    */
  "PENV_10",              /* PRC Envelope #10 324 x 458 mm   */
  "P16K_ROTATED",         /* PRC 16K Rotated                 */
  "P32K_ROTATED",         /* PRC 32K Rotated                 */
  "P32KBIG_ROTATED",      /* PRC 32K(Big) Rotated            */
  "PENV_1_ROTATED",       /* PRC Envelope #1 Rotated 165 x 102 mm */
  "PENV_2_ROTATED",       /* PRC Envelope #2 Rotated 176 x 102 mm */
  "PENV_3_ROTATED",       /* PRC Envelope #3 Rotated 176 x 125 mm */
  "PENV_4_ROTATED",       /* PRC Envelope #4 Rotated 208 x 110 mm */
  "PENV_5_ROTATED",       /* PRC Envelope #5 Rotated 220 x 110 mm */
  "PENV_6_ROTATED",       /* PRC Envelope #6 Rotated 230 x 120 mm */
  "PENV_7_ROTATED",       /* PRC Envelope #7 Rotated 230 x 160 mm */
  "PENV_8_ROTATED",       /* PRC Envelope #8 Rotated 309 x 120 mm */
  "PENV_9_ROTATED",       /* PRC Envelope #9 Rotated 324 x 229 mm */
  "PENV_10_ROTATED",      /* PRC Envelope #10 Rotated 458 x 324 mm */

HRESULT PaperSize([out, retval]BSTR* papersize);
returns the printer paper size. Examples are : A4, LETTER.

HRESULT RepeatTitles([in]BSTR cellrange);
defines the repeating titles area across pages for the current worksheet. This property can be used to set repeat rows and/or repeat columns. The cellrange parameter is passed using the regular RxCxx:RyCyy form or Ax:Ax, where each block of cell is separated by a semi-colon. Examples : $1:$6 (in order to repeat rows 1 to 6 in each page)  $B:$D (in order to repeat columns B to D in each page)  $1:$6;$B:$D (in order to repeat both rows and columns in each page).

HRESULT CenterHorizontally([in]BOOL centerhorizontally);
sets whether or not the content should be centered horizontally.

HRESULT CenterHorizontally([out, retval]BOOL* centerhorizontally);
retrieves whether or not the content should be centered horizontally.

HRESULT CenterVertically([in]BOOL centervertically);
sets whether or not the content should be centered vertically.

HRESULT CenterVertically([out, retval]BOOL* centervertically);
retrieves whether or not the content should be centered vertically.

HRESULT RepeatRows([out, retval]BSTR* repeatrows);
returns the repeat rows.

HRESULT RepeatColumns([out, retval]BSTR* repeatcolumns);
returns the repeat columns.

HRESULT MarginLeft([out, retval]double* marginleft);
returns the left margin (in centimeters).

HRESULT MarginTop([out, retval]double* margintop);
returns the top margin (in centimeters).

HRESULT MarginRight([out, retval]double* marginright);
returns the right margin (in centimeters).

HRESULT MarginBottom([out, retval]double* marginbottom);
returns the bottom margin (in centimeters).

HRESULT MarginHeader([out, retval]double* marginheader);
returns the header margin (in centimeters).

HRESULT MarginFooter([out, retval]double* marginfooter);
returns the footer margin (in centimeters).

HRESULT FirstPageNumber([out, retval]int* pagenumber);
returns the first page number. Default value is 1.

HRESULT FirstPageNumber([in]int pagenumber);
sets the first page number. Default value is 1.

HRESULT PageBreakPreviewMode([in]BOOL previewmode);
sets whether or not the content should appear in page break preview mode.

HRESULT ShowGridlines([in]BOOL gridlines);
sets whether or not the grid lines should show up in the sheet.

HRESULT ShowGridlines([out, retval]BOOL* gridlines);
retrieves whether or not the grid lines should show up in the sheet.

HRESULT PreviewScale([in]int previewScale);
defines the scale of preview/pdf pages. Default value is 100 (100%).

HRESULT PreviewScale([out, retval]int* previewScale);
returns the scale of preview/pdf pages. Default value is 100 (100%).

HRESULT GridColor([out, retval] int* nRGB);
retrieves the RGB color of the worksheet grid.

HRESULT GridColor([in]int nRGB);
sets the RGB color of the worksheet grid.

HRESULT CopyTo([in]IXlsPageSetup* destPageSetup);
copies the page setup options to the passed page setup object.

HRESULT PageEvenHeader([in]BSTR docheader);
defines the page header for even pages (2, 4, ...) of the current worksheet. Saved only in XLSX files (and variants). Excel limits it to less than 256 characters.

HRESULT PageEvenHeader([out, retval]BSTR* docheader);
retrieves the page header for even pages (2, 4, ...) of the current worksheet. Saved only in XLSX files (and variants).

HRESULT PageEvenFooter([in]BSTR docfooter);
defines the page footer for even pages (2, 4, ...) of the current worksheet. Saved only in XLSX files (and variants). Excel limits it to less than 256 characters.

HRESULT PageEvenFooter([out, retval]BSTR* docfooter);
retrieves the page footer for even pages (2, 4, ...) of the current worksheet. Saved only in XLSX files (and variants).

HRESULT PageFirstHeader([in]BSTR docheader);
defines the page header for the first page of the current worksheet. Saved only in XLSX files (and variants). Excel limits it to less than 256 characters.

HRESULTPageFirstHeader([out, retval]BSTR* docheader);
retrieves the page header for the first page of the current worksheet. Saved only in XLSX files (and variants).

HRESULT PageFirstFooter([in]BSTR docfooter);
defines the page footer for the first page of the current worksheet. Saved only in XLSX files (and variants). Excel limits it to less than 256 characters.

HRESULT PageFirstFooter([out, retval]BSTR* docfooter);
retrieves the page footer for the first page of the current worksheet. Saved only in XLSX files (and variants).

HRESULT PaperSizeForPrinter([in]BSTR printerName, [in]BSTR papersize);
sets the printer paper size for the printer whose name is passed as well. The printer must be installed on the computer where xlsgen runs.

HRESULT PageNumberLeftToRight([in]BOOL pageOrder);
sets whether the page number order is left to right and then bottom, or top to bottom and then left to right. Default is : FALSE.

HRESULT PageNumberLeftToRight([out, retval]BOOL* pageOrder);
retrieves whether the page number order is left to right and then bottom, or top to bottom and then left to right. Default is : FALSE.