Message-ID: <668786406.8163.1711635080207.JavaMail.web05$@web05> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_8162_1594648938.1711635080207" ------=_Part_8162_1594648938.1711635080207 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html ShowValueAs.SetShowValueAs(ShowValueAsType, SourceField, Int32)<= /title> <!--[if gte mso 9]> <xml> <o:OfficeDocumentSettings> <o:TargetScreenSize>1024x640</o:TargetScreenSize> <o:PixelsPerInch>72</o:PixelsPerInch> <o:AllowPNG/> </o:OfficeDocumentSettings> <w:WordDocument> <w:View>Print</w:View> <w:Zoom>90</w:Zoom> <w:DoNotOptimizeForBrowser/> </w:WordDocument> </xml> <![endif]--> <style> <!-- @page Section1 { size: 8.5in 11.0in; margin: 1.0in; mso-header-margin: .5in; mso-footer-margin: .5in; mso-paper-source: 0; } td { page-break-inside: avoid; } tr { page-break-after: avoid; } div.Section1 { page: Section1; } /* Confluence print stylesheet. Common to all themes for print medi= a */ /* Full of !important until we improve batching for print CSS */ #main { padding-bottom: 1em !important; /* The default padding of 6em is too mu= ch for printouts */ } body { font-family: Arial, Helvetica, FreeSans, sans-serif; font-size: 10pt; line-height: 1.2; } body, #full-height-container, #main, #page, #content, .has-personal-sidebar= #content { background: #fff !important; color: #000 !important; border: 0 !important; width: 100% !important; height: auto !important; min-height: auto !important; margin: 0 !important; padding: 0 !important; display: block !important; } a, a:link, a:visited, a:focus, a:hover, a:active { color: #000; } #content h1, #content h2, #content h3, #content h4, #content h5, #content h6 { font-family: Arial, Helvetica, FreeSans, sans-serif; page-break-after: avoid; } pre { font-family: Monaco, "Courier New", monospace; } #header, .aui-header-inner, #navigation, #sidebar, .sidebar, #personal-info-sidebar, .ia-fixed-sidebar, .page-actions, .navmenu, .ajs-menu-bar, .noprint, .inline-control-link, .inline-control-link a, a.show-labels-editor, .global-comment-actions, .comment-actions, .quick-comment-container, #addcomment { display: none !important; } .comment .date::before { content: none !important; /* remove middot for print view */ } h1.pagetitle img { height: auto; width: auto; } .print-only { display: block; } #footer { position: relative !important; /* CONF-17506 Place the footer at end of= the content */ margin: 0; padding: 0; background: none; clear: both; } #poweredby { border-top: none; background: none; } #poweredby li.print-only { display: list-item; font-style: italic; } #poweredby li.noprint { display:none; } /* no width controls in print */ .wiki-content .table-wrap, .wiki-content p, .panel .codeContent, .panel .codeContent pre, .image-wrap { overflow: visible !important; } /* TODO - should this work? */ #children-section, #comments-section .comment, #comments-section .comment .comment-body, #comments-section .comment .comment-content, #comments-section .comment p { page-break-inside: avoid; } #page-children a { text-decoration: none; } /** hide twixies the specificity here is a hack because print styles are getting loaded before the base styles. */ #comments-section.pageSection .section-header, #comments-section.pageSection .section-title, #children-section.pageSection .section-header, #children-section.pageSection .section-title, .children-show-hide { padding-left: 0; margin-left: 0; } .children-show-hide.icon { display: none; } /* personal sidebar */ .has-personal-sidebar #content { margin-right: 0px; } .has-personal-sidebar #content .pageSection { margin-right: 0px; } --> </style> </head> <body> <h1>ShowValueAs.SetShowValueAs(ShowValueAsType, SourceField, Int32)</h1= > <div class=3D"Section1"> <p> <span style=3D"color:black"></span></p> <h4 id=3D"ShowValueAs.SetShowValueAs(ShowValueAsType,SourceField,Int32)-Int= roducedinbuild8.4">Introduced in build 8.4</h4>=20 <h2 id=3D"ShowValueAs.SetShowValueAs(ShowValueAsType,SourceField,Int32)-Des= cription">Description</h2> <p></p>Sets the=20 <code>ShowValueAs</code> properties of a PivotTable.=20 <div class=3D"code panel pdl" style=3D"border-width: 1px;"> <div class=3D"codeHeader panelHeader pdl" style=3D"border-bottom-width: 1px= ;"> <b>C#</b> </div> <div class=3D"codeContent panelContent pdl">=20 <pre class=3D"theme: Default; brush: csharp; collapse: false; gutter: false= " style=3D"font-size:12px;">public SetShowValueAs(PivotTableField.ShowValue= AsType showValueAs, SourceField baseField, Int32 baseItemIndex) </pre>=20 </div> </div>=20 <div class=3D"code panel pdl" style=3D"border-width: 1px;"> <div class=3D"codeHeader panelHeader pdl" style=3D"border-bottom-width: 1px= ;"> <b>vb.net</b> </div> <div class=3D"codeContent panelContent pdl">=20 <pre class=3D"theme: Default; brush: vbnet; collapse: false; gutter: false"= style=3D"font-size:12px;">public Function SetShowValueAs(ByVal showValueAs= As ShowValueAs.ShowValueAsType, ByVal baseField As SourceField, ByVal base= ItemIndex As Integer) </pre>=20 </div> </div> <p> </p> <h2 id=3D"ShowValueAs.SetShowValueAs(ShowValueAsType,SourceField,Int32)-Par= ameters">Parameters</h2> <p></p>=20 <h6 id=3D"ShowValueAs.SetShowValueAs(ShowValueAsType,SourceField,Int32)-sho= wValueAs">showValueAs</h6> The type of ShowValueAs described by ShowValueAs= Type.=20 <h6 id=3D"ShowValueAs.SetShowValueAs(ShowValueAsType,SourceField,Int32)-bas= eField">baseField</h6> The base field for comparisons.=20 <h6 id=3D"ShowValueAs.SetShowValueAs(ShowValueAsType,SourceField,Int32)-bas= eItemIndex">baseItemIndex</h6> The index of the base item for comparisons= =20 <h2 id=3D"ShowValueAs.SetShowValueAs(ShowValueAsType,SourceField,Int32)-Exa= mples">Examples</h2>=20 <div class=3D"code panel pdl" style=3D"border-width: 1px;"> <div class=3D"codeHeader panelHeader pdl" style=3D"border-bottom-width: 1px= ;"> <b>C#</b> </div> <div class=3D"codeContent panelContent pdl">=20 <pre class=3D"theme: Default; brush: csharp; gutter: false" style=3D"font-s= ize:12px;">ExcelApplication xla =3D new ExcelApplication();           Workbook wb =3D xla.Open(@"C:\MySpr= eadsheet.xlsx");           Worksheet ws =3D wb.Worksheets[0]; PivotTable pt =3D ws.PivotTables[0];           DataField df =3D pt.DataFields[0];           df.SetShowValueAs(ShowValueAs.ShowValueA= sType.Difference, pt.SourceFields[0], 0); </pre>=20 </div> </div> <div class=3D"code panel pdl" style=3D"border-width: 1px;"> <div class=3D"codeHeader panelHeader pdl" style=3D"border-bottom-width: 1px= ;"> <b>vb.net</b> </div> <div class=3D"codeContent panelContent pdl">=20 <pre class=3D"theme: Default; brush: csharp; gutter: false" style=3D"font-s= ize:12px;">Dim xla As New ExcelApplication()           Dim wb As Workbook =3D xla.Open("C:= \MySpreadsheet.xlsx")           Dim ws As Worksheet =3D wb.Worksheets(0) Dim pt As PivotTable =3D ws.PivotTables(0);           Dim df As DataField =3D pt.DataFields(0)           df.SetShowValueAs(ShowValueAs.ShowValueA= sType.Difference, pt.SourceFields(0), 0); </pre>=20 </div> </div>=20 <h2 id=3D"ShowValueAs.SetShowValueAs(ShowValueAsType,SourceField,Int32)-Rem= arks">Remarks</h2>=20 <p>This property cannot be set on ValuesLabels. You can check if a PivotFie= ld is calculated field with the <a href=3D"/display/EW9/PivotTableField.IsV= aluesLabel" rel=3D"nofollow">IsValuesLabel </a>Property</p> <p>This is the same as going to <em>Value Field Settings</em> > <em>Show= values as</em>.</p> <p>When calling <code>SetShowValueAs()</code>, certain ShowValueAsTypes use= a source field as a base field and an index for one of the values in the d= ata source column associated with the source field. The base field and valu= e specified by the base item index are used to compute the values shown in = the PivotTable.</p> <p>Use <code><a href=3D"/display/EW9/ShowValueAs.BaseItemNext" rel=3D"nofol= low">ShowValueAs.BaseItemNext</a></code> and <code><a href=3D"/display/EW9/= ShowValueAs.BaseItemPrevious" rel=3D"nofollow">ShowValueAs.BaseItemPrevious= </a></code> to specify <em>Next</em> or <em>Previous</em>.</p> </div> </body> </html> ------=_Part_8162_1594648938.1711635080207--