<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Documentation – Add Pivot Table Row and Column Fields in Aspose.Cells for Go via C&#43;&#43;</title>
    <link>https://docs.aspose.com/cells/go-cpp/pivot-table-add-row-and-column-fields/</link>
    <description>Recent content in Add Pivot Table Row and Column Fields in Aspose.Cells for Go via C&#43;&#43; on Documentation</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    
	  <atom:link href="https://docs.aspose.com/cells/go-cpp/pivot-table-add-row-and-column-fields/index.xml" rel="self" type="application/rss+xml" />
    
    
      
        
      
    
    
    <item>
      <title>Gocpp: Filtering Pivot Tables by Label or Value</title>
      <link>https://docs.aspose.com/cells/go-cpp/filter-by-label-or-value-of-pivot-table/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://docs.aspose.com/cells/go-cpp/filter-by-label-or-value-of-pivot-table/</guid>
      <description>
        
        
        

&lt;div class=&#34;alert alert-primary&#34; role=&#34;alert&#34;&gt;

Aspose.Cells provides five practical strategies for filtering the data displayed in a pivot table. You can apply label filters to text-based row or column fields, use date filters when the field contains only date-time cells or blanks, apply value filters against aggregated numbers, use top 10 filters to rank by a value field, or manually hide and unhide individual pivot items using the &lt;code&gt;IsHidden&lt;/code&gt; property. Each strategy is exposed through dedicated APIs on the &lt;code&gt;PivotField&lt;/code&gt; and &lt;code&gt;PivotItem&lt;/code&gt; classes.
&lt;/div&gt;

&lt;h2 id=&#34;introduction&#34;&gt;&lt;strong&gt;Introduction&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;Pivot tables are powerful analytical tools, but raw summaries often contain far more information than you need to present. Filtering is the primary mechanism for narrowing a pivot table down to the rows, columns, or values that matter for a specific report. Aspose.Cells for Go via C++ mirrors the filtering capabilities that are available in Microsoft Excel, exposing them programmatically so that report generation can be fully automated.
The following filtering strategies are covered in this article:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Label Filter&lt;/strong&gt; — filters row or column field items based on their text labels.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Date Filter&lt;/strong&gt; — filters row or column fields that contain only date-time values (or blanks).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Value Filter&lt;/strong&gt; — filters items based on the aggregated values of a data field.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Top 10 Filter&lt;/strong&gt; — shows only the top or bottom N items ranked by a value field.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Hide / Unhide Pivot Items&lt;/strong&gt; — manually controls the visibility of each individual item in a field.
Each approach uses a different method on the &lt;code&gt;PivotField&lt;/code&gt; class or a property on the &lt;code&gt;PivotItem&lt;/code&gt; class. After applying any filter, you must call &lt;code&gt;RefreshData()&lt;/code&gt; and &lt;code&gt;CalculateData()&lt;/code&gt; on the pivot table so that the cached data and calculated values reflect the new filter state.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;label-filter&#34;&gt;&lt;strong&gt;Label Filter&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;A label filter allows you to filter the items of a row or column field by comparing their text captions against a pattern. This is useful when you want to display only products whose names start with a specific letter, contain a particular word, or match some other caption-based criterion.
Aspose.Cells exposes label filtering through the &lt;code&gt;PivotField.FilterByLabel(PivotFilterType, const char16_t*)&lt;/code&gt; method. The &lt;code&gt;PivotFilterType&lt;/code&gt; enumeration includes values such as &lt;code&gt;CaptionBeginsWith&lt;/code&gt;, &lt;code&gt;CaptionContains&lt;/code&gt;, &lt;code&gt;CaptionEndsWith&lt;/code&gt;, &lt;code&gt;CaptionDoesNotContain&lt;/code&gt;, &lt;code&gt;CaptionIsNotBlank&lt;/code&gt;, &lt;code&gt;CaptionIsBlank&lt;/code&gt;, and so on. The second argument supplies the label string used for comparison.
The following example loads a workbook containing an existing pivot table, applies a label filter so that only items whose captions begin with a specified prefix remain visible, refreshes the pivot table, and saves the result.&lt;/p&gt;
&lt;script type=&#34;application/javascript&#34; src=&#34;https://gist.github.com/aspose-cells-gists/b414abd53259bbc47d2c3c0fe985395b.js?file=Examples-Go-CPP-FilterByLabelOrValueOfPivotTable.go&#34;&gt;&lt;/script&gt;

&lt;h2 id=&#34;date-filter&#34;&gt;&lt;strong&gt;Date Filter&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;Date filters let you narrow a pivot table by date-based criteria such as today, last week, this month, next quarter, or a specific date range. They are specialized filters that work only against fields that store date-time information.&lt;/p&gt;


&lt;div class=&#34;alert alert-primary&#34; role=&#34;alert&#34;&gt;

The date filter only works when the row or column area contains only date-time cells or blank values. If the underlying field contains other data types such as numbers or text, the date filter will not produce the expected result. Make sure the field is formatted as a date and that all values are valid &lt;code&gt;DateTime&lt;/code&gt; instances or empty cells before applying this filter.
&lt;/div&gt;

&lt;p&gt;Aspose.Cells exposes date filtering through the &lt;code&gt;PivotField.FilterByDate(PivotFilterType, const Vector&amp;lt;DateTime&amp;gt;&amp;amp; values)&lt;/code&gt; method. The &lt;code&gt;PivotFilterType&lt;/code&gt; enumeration contains dedicated date values such as &lt;code&gt;Today&lt;/code&gt;, &lt;code&gt;Yesterday&lt;/code&gt;, &lt;code&gt;LastWeek&lt;/code&gt;, &lt;code&gt;ThisWeek&lt;/code&gt;, &lt;code&gt;NextWeek&lt;/code&gt;, &lt;code&gt;LastMonth&lt;/code&gt;, &lt;code&gt;ThisMonth&lt;/code&gt;, &lt;code&gt;NextMonth&lt;/code&gt;, &lt;code&gt;LastQuarter&lt;/code&gt;, &lt;code&gt;ThisQuarter&lt;/code&gt;, &lt;code&gt;NextQuarter&lt;/code&gt;, &lt;code&gt;LastYear&lt;/code&gt;, &lt;code&gt;ThisYear&lt;/code&gt;, &lt;code&gt;NextYear&lt;/code&gt;, and &lt;code&gt;Between&lt;/code&gt;. Depending on the chosen filter type, you pass one or two &lt;code&gt;DateTime&lt;/code&gt; values (for &lt;code&gt;Between&lt;/code&gt;, you pass the start and end dates).
The following example loads a workbook with a pivot table whose row area contains a date field, applies a date filter that restricts the visible items to a particular date range, refreshes the pivot table, and saves the workbook.&lt;/p&gt;
&lt;script type=&#34;application/javascript&#34; src=&#34;https://gist.github.com/aspose-cells-gists/b414abd53259bbc47d2c3c0fe985395b.js?file=Examples-Go-CPP-FilterByLabelOrValueOfPivotTable-1.go&#34;&gt;&lt;/script&gt;

&lt;h2 id=&#34;value-filter&#34;&gt;&lt;strong&gt;Value Filter&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;Value filters operate on the aggregated values that a pivot table calculates in its data area. Instead of matching text labels, they compare numeric totals against a threshold. Typical use cases include showing only products whose sum of sales exceeds a target amount or only regions whose count of transactions falls within a range.
Aspose.Cells exposes value filtering through the &lt;code&gt;PivotField.FilterByValue(PivotField valueField, PivotFilterType filterType, const Vector&amp;lt;Variant&amp;gt;&amp;amp; values)&lt;/code&gt; method. The &lt;code&gt;filterType&lt;/code&gt; parameter uses values such as &lt;code&gt;ValueGreaterThan&lt;/code&gt;, &lt;code&gt;ValueLessThan&lt;/code&gt;, &lt;code&gt;ValueBetween&lt;/code&gt;, &lt;code&gt;ValueEqual&lt;/code&gt;, &lt;code&gt;ValueNotEqual&lt;/code&gt;, &lt;code&gt;ValueGreaterThanOrEqual&lt;/code&gt;, and &lt;code&gt;ValueLessThanOrEqual&lt;/code&gt;. The &lt;code&gt;valueField&lt;/code&gt; parameter specifies which data field should be evaluated, and the final argument(s) supply the threshold value(s).
The following example loads a workbook with a pivot table, applies a value filter that keeps only items whose aggregated sales exceed a numeric threshold, refreshes the pivot table, and saves the workbook.&lt;/p&gt;
&lt;script type=&#34;application/javascript&#34; src=&#34;https://gist.github.com/aspose-cells-gists/b414abd53259bbc47d2c3c0fe985395b.js?file=Examples-Go-CPP-FilterByLabelOrValueOfPivotTable-2.go&#34;&gt;&lt;/script&gt;

&lt;h2 id=&#34;top-10-filter&#34;&gt;&lt;strong&gt;Top 10 Filter&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;The top 10 filter is a specialized form of value filter that retains only the highest or lowest N items based on a chosen value field. It is commonly used for ranking reports such as &amp;ldquo;top 10 products by revenue&amp;rdquo; or &amp;ldquo;bottom 5 regions by sales count&amp;rdquo;.&lt;/p&gt;


&lt;div class=&#34;alert alert-primary&#34; role=&#34;alert&#34;&gt;

The top 10 filter is only effective when the pivot table has one or more value pivot fields in the data area. Without at least one value field, there is no aggregated measure to rank the items against, and the filter cannot be applied.
&lt;/div&gt;

&lt;p&gt;Aspose.Cells exposes top 10 filtering through the &lt;code&gt;PivotField.FilterTop10(int32_t itemCount, bool isTop, PivotField valueField, PivotFilterType filterType)&lt;/code&gt; method. The &lt;code&gt;itemCount&lt;/code&gt; parameter defines how many items to retain, &lt;code&gt;isTop&lt;/code&gt; indicates whether to keep the top items (true) or the bottom items (false), &lt;code&gt;valueField&lt;/code&gt; references the data field used for ranking, and &lt;code&gt;filterType&lt;/code&gt; controls how the value is computed (typically &lt;code&gt;Sum&lt;/code&gt;, but also &lt;code&gt;Count&lt;/code&gt; and &lt;code&gt;Percent&lt;/code&gt;).
The following example loads a workbook with a pivot table that contains a value field, applies a top 10 filter to keep only the highest 10 items by the sum of sales, refreshes the pivot table, and saves the workbook.&lt;/p&gt;
&lt;script type=&#34;application/javascript&#34; src=&#34;https://gist.github.com/aspose-cells-gists/b414abd53259bbc47d2c3c0fe985395b.js?file=Examples-Go-CPP-FilterByLabelOrValueOfPivotTable-3.go&#34;&gt;&lt;/script&gt;

&lt;h2 id=&#34;filter-by-hiding-or-unhiding-pivot-items&#34;&gt;&lt;strong&gt;Filter by Hiding or Unhiding Pivot Items&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;In addition to the structured filter APIs, Aspose.Cells allows you to control the visibility of each individual pivot item directly. By iterating through the &lt;code&gt;PivotItems&lt;/code&gt; collection of a &lt;code&gt;PivotField&lt;/code&gt; and toggling the &lt;code&gt;IsHidden&lt;/code&gt; property, you can selectively suppress specific items without applying a formula-based filter. Setting &lt;code&gt;IsHidden = true&lt;/code&gt; hides the item from the pivot table; setting &lt;code&gt;IsHidden = false&lt;/code&gt; unhides it and makes it visible again.
This approach is useful when the filtering rule is irregular or item-specific, such as hiding a small number of named categories that should not appear in a particular report. The example below loads a pivot table, hides a specific item by name, demonstrates how to unhide it, refreshes the pivot table, and saves the workbook.&lt;/p&gt;
&lt;script type=&#34;application/javascript&#34; src=&#34;https://gist.github.com/aspose-cells-gists/b414abd53259bbc47d2c3c0fe985395b.js?file=Examples-Go-CPP-FilterByLabelOrValueOfPivotTable-4.go&#34;&gt;&lt;/script&gt;

&lt;h2 id=&#34;summary&#34;&gt;&lt;strong&gt;Summary&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;Aspose.Cells for Go via C++ provides a complete set of pivot table filtering capabilities that match those found in Microsoft Excel. Label, date, and value filters cover the most common analytical scenarios, while the top 10 filter handles ranking reports. When the filtering rule is irregular, the &lt;code&gt;PivotItem.IsHidden&lt;/code&gt; property offers a flexible, item-level fallback. Combining these strategies — for example, applying a label filter and then hiding specific items — allows you to build precisely targeted pivot table reports entirely from code.&lt;/p&gt;
&lt;h2 id=&#34;related-articles&#34;&gt;Related Articles&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://docs.aspose.com/cells/cells/go-cpp/pivot-tables/&#34;&gt;Insert Pivot Table&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://docs.aspose.com/cells/cells/go-cpp/pivot-table-add-row-and-column-fields/&#34;&gt;Add Pivot Table Row and Column Fields in Aspose.Cells for Go via C++&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://docs.aspose.com/cells/cells/go-cpp/add-page-field-in-pivot-table/&#34;&gt;Add Filter Fields to a Pivot Table in Aspose.Cells for Go via C++&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://docs.aspose.com/cells/cells/go-cpp/manage-value-fields/&#34;&gt;Manage Pivot Table Value Fields in Aspose.Cells for Go via C++&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://docs.aspose.com/cells/cells/go-cpp/refresh-pivot-table/&#34;&gt;Refresh Pivot Tables and Pivot Caches in Aspose.Cells for Go via C++&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;button class=&#34;floating-button&#34; id=&#34;openModalBtn&#34;&gt;AI Document Assistant&lt;/button&gt;

&lt;div class=&#34;modal&#34; id=&#34;modal&#34;&gt;
    &lt;button class=&#34;close-btn&#34; id=&#34;closeModalBtn&#34;&gt;Close&lt;/button&gt;
    &lt;iframe src=&#34;https://products.aspose.ai/cells/chat/document/go?source=docs&#34; frameborder=&#34;0&#34; width=&#34;100%&#34; height=&#34;100%&#34;&gt;&lt;/iframe&gt;
&lt;/div&gt;

&lt;style&gt;
    .floating-button {
        position: fixed;
        bottom: 20px;
        right: 20px;
        background-color: #007bff;
        color: white;
        border: none;
        padding: 15px 20px;
        border-radius: 50px;
        cursor: pointer;
        font-size: 16px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        z-index: 999;
    }

    .modal {
        display: none;
        position: fixed;
        top: 10%;
        left: 10%;
        width: 80%;
        height: 80%;
        background-color: white;
        border: none;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
        z-index: 1000;
        padding: 20px;
        box-sizing: border-box;
    }

    .close-btn {
        position: absolute;
        top: 10px;
        right: 10px;
        background-color: #f44336;
        color: white;
        border: none;
        padding: 5px 10px;
        cursor: pointer;
        font-size: 16px;
        border-radius: 3px;
    }
&lt;/style&gt;

&lt;script&gt;
    const openModalBtn = document.getElementById(&#39;openModalBtn&#39;);
    const closeModalBtn = document.getElementById(&#39;closeModalBtn&#39;);
    const modal = document.getElementById(&#39;modal&#39;);

    openModalBtn.addEventListener(&#39;click&#39;, function() {
        modal.style.display = &#39;block&#39;;
    });

    closeModalBtn.addEventListener(&#39;click&#39;, function() {
        modal.style.display = &#39;none&#39;;
    });

    window.addEventListener(&#39;click&#39;, function(event) {
        if (event.target === modal) {
            modal.style.display = &#39;none&#39;;
        }
    });
&lt;/script&gt;


      </description>
    </item>
    
    <item>
      <title>Gocpp: Specifying the Absolute Position of the Pivot Item with Golang via C&#43;&#43;</title>
      <link>https://docs.aspose.com/cells/go-cpp/specifying-the-absolute-position-of-the-pivot-item/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://docs.aspose.com/cells/go-cpp/specifying-the-absolute-position-of-the-pivot-item/</guid>
      <description>
        
        
        

&lt;div class=&#34;alert alert-primary&#34; role=&#34;alert&#34;&gt;

&lt;p&gt;Sometimes, users need to specify the absolute position of the pivot items. Aspose.Cells API has exposed a few new properties and a method to achieve this requirement.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Added &lt;a href=&#34;https://reference.aspose.com/cells/go-cpp/pivotitem/getposition/&#34;&gt;&lt;strong&gt;PivotItem.GetPosition()&lt;/strong&gt;&lt;/a&gt; property that can be used to specify the position index in all PivotItems, regardless of the parent node. Added &lt;a href=&#34;https://reference.aspose.com/cells/go-cpp/pivotitem/getpositioninsameparentnode/&#34;&gt;&lt;strong&gt;PivotItem.GetPositionInSameParentNode()&lt;/strong&gt;&lt;/a&gt; property that can be used to specify the position index in the PivotItems under the same parent node.&lt;/li&gt;
&lt;li&gt;Added &lt;a href=&#34;https://reference.aspose.com/cells/go-cpp/pivotitem/move/&#34;&gt;&lt;strong&gt;PivotItem.Move(int count, bool isSameParent)&lt;/strong&gt;&lt;/a&gt; method in order to move the item up or down based on the count value, where &lt;strong&gt;count&lt;/strong&gt; is the number of positions to move the PivotItem up or down. If the count value is less than zero, the item will be moved up, whereas if the count value is larger than zero, the PivotItem will move down. The Boolean‑type &lt;code&gt;isSameParent&lt;/code&gt; parameter specifies whether the moving operation should be performed in the same parent node.&lt;/li&gt;
&lt;li&gt;Obsoleted the &lt;code&gt;PivotItem.Move(int count)&lt;/code&gt; method; therefore, it is suggested to use the newly added method &lt;a href=&#34;https://reference.aspose.com/cells/go-cpp/pivotitem/move/&#34;&gt;&lt;strong&gt;PivotItem.Move(int count, bool isSameParent)&lt;/strong&gt;&lt;/a&gt; instead.&lt;/li&gt;
&lt;/ul&gt;

&lt;/div&gt;

&lt;p&gt;The following sample code creates a Pivot Table and then specifies the positions of the Pivot Items in the same parent node. You can download the &lt;a href=&#34;5112632.xlsx&#34;&gt;source Excel&lt;/a&gt; and &lt;a href=&#34;5112619.xlsx&#34;&gt;output Excel&lt;/a&gt; files for your reference. If you open the output Excel file, you will see the Pivot Item &lt;strong&gt;&amp;ldquo;4H12&amp;rdquo;&lt;/strong&gt; is at the 0th position in parent &lt;strong&gt;&amp;ldquo;K11&amp;rdquo;&lt;/strong&gt;, and &lt;strong&gt;&amp;ldquo;DIF400&amp;rdquo;&lt;/strong&gt; is at the 3rd position. Similarly, &lt;strong&gt;CA32&lt;/strong&gt; is at position 1 and &lt;strong&gt;AAA3&lt;/strong&gt; is at position 2.&lt;/p&gt;
&lt;script type=&#34;application/javascript&#34; src=&#34;https://gist.github.com/aspose-cells-gists/b414abd53259bbc47d2c3c0fe985395b.js?file=Examples-Go-CPP-SpecifyingTheAbsolutePositionOfThePivotItem.go&#34;&gt;&lt;/script&gt;



&lt;div class=&#34;alert alert-primary&#34; role=&#34;alert&#34;&gt;

Please note that it is necessary to call the &lt;code&gt;PivotTable.RefreshData&lt;/code&gt; and &lt;code&gt;PivotTable.CalculateData&lt;/code&gt; methods before using &lt;a href=&#34;https://reference.aspose.com/cells/go-cpp/pivotitem/getposition/&#34;&gt;&lt;strong&gt;PivotItem.GetPosition()&lt;/strong&gt;&lt;/a&gt;, &lt;a href=&#34;https://reference.aspose.com/cells/go-cpp/pivotitem/getpositioninsameparentnode/&#34;&gt;&lt;strong&gt;PivotItem.GetPositionInSameParentNode()&lt;/strong&gt;&lt;/a&gt; properties, and the &lt;a href=&#34;https://reference.aspose.com/cells/go-cpp/pivotitem/move/&#34;&gt;&lt;strong&gt;PivotItem.Move(int count, bool isSameParent)&lt;/strong&gt;&lt;/a&gt; method.
&lt;/div&gt;

&lt;button class=&#34;floating-button&#34; id=&#34;openModalBtn&#34;&gt;AI Document Assistant&lt;/button&gt;

&lt;div class=&#34;modal&#34; id=&#34;modal&#34;&gt;
    &lt;button class=&#34;close-btn&#34; id=&#34;closeModalBtn&#34;&gt;Close&lt;/button&gt;
    &lt;iframe src=&#34;https://products.aspose.ai/cells/chat/document/go?source=docs&#34; frameborder=&#34;0&#34; width=&#34;100%&#34; height=&#34;100%&#34;&gt;&lt;/iframe&gt;
&lt;/div&gt;

&lt;style&gt;
    .floating-button {
        position: fixed;
        bottom: 20px;
        right: 20px;
        background-color: #007bff;
        color: white;
        border: none;
        padding: 15px 20px;
        border-radius: 50px;
        cursor: pointer;
        font-size: 16px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        z-index: 999;
    }

    .modal {
        display: none;
        position: fixed;
        top: 10%;
        left: 10%;
        width: 80%;
        height: 80%;
        background-color: white;
        border: none;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
        z-index: 1000;
        padding: 20px;
        box-sizing: border-box;
    }

    .close-btn {
        position: absolute;
        top: 10px;
        right: 10px;
        background-color: #f44336;
        color: white;
        border: none;
        padding: 5px 10px;
        cursor: pointer;
        font-size: 16px;
        border-radius: 3px;
    }
&lt;/style&gt;

&lt;script&gt;
    const openModalBtn = document.getElementById(&#39;openModalBtn&#39;);
    const closeModalBtn = document.getElementById(&#39;closeModalBtn&#39;);
    const modal = document.getElementById(&#39;modal&#39;);

    openModalBtn.addEventListener(&#39;click&#39;, function() {
        modal.style.display = &#39;block&#39;;
    });

    closeModalBtn.addEventListener(&#39;click&#39;, function() {
        modal.style.display = &#39;none&#39;;
    });

    window.addEventListener(&#39;click&#39;, function(event) {
        if (event.target === modal) {
            modal.style.display = &#39;none&#39;;
        }
    });
&lt;/script&gt;


      </description>
    </item>
    
    <item>
      <title>Gocpp: Get the Cell Object by DisplayName of PivotField of PivotTable with Golang via C&#43;&#43;</title>
      <link>https://docs.aspose.com/cells/go-cpp/get-the-cell-object-by-displayname-of-pivotfield-of-pivottable/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://docs.aspose.com/cells/go-cpp/get-the-cell-object-by-displayname-of-pivotfield-of-pivottable/</guid>
      <description>
        
        
        

&lt;div class=&#34;alert alert-primary&#34; role=&#34;alert&#34;&gt;

Aspose.Cells provides the &lt;a href=&#34;https://reference.aspose.com/cells/go-cpp/pivottable/getcellbydisplayname/&#34;&gt;&lt;strong&gt;PivotTable::GetCellByDisplayName()&lt;/strong&gt;&lt;/a&gt; method, which you can use to access the cell object by the display name of a pivot field. This method is useful when you want to highlight or format your pivot field header. This article explains how to retrieve the cell object by the display name of a data field and then apply formatting to it.
&lt;/div&gt;

&lt;h2 id=&#34;get-the-cell-object-by-displayname-of-pivotfield-of-pivottable&#34;&gt;&lt;strong&gt;Get the Cell Object by DisplayName of PivotField of PivotTable&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;The following code accesses the first pivot table of the worksheet and then retrieves the cell by the display name of the &lt;strong&gt;first&lt;/strong&gt; data field of the pivot table. It then changes the fill color and font color of the cell to light blue and black, respectively. Below are screenshots showing how the pivot table looks before and after the execution of the code.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th style=&#34;text-align:left&#34;&gt;&lt;strong&gt;Pivot Table - Before&lt;/strong&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style=&#34;text-align:left&#34;&gt;&lt;img src=&#34;get-the-cell-object-by-displayname-of-pivotfield-of-pivottable_1.png&#34; alt=&#34;todo:image_alt_text&#34;&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;script type=&#34;application/javascript&#34; src=&#34;https://gist.github.com/aspose-cells-gists/b414abd53259bbc47d2c3c0fe985395b.js?file=Examples-Go-CPP-GetTheCellObjectByDisplaynameOfPivotfieldOfPivottable.go&#34;&gt;&lt;/script&gt;

&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th style=&#34;text-align:left&#34;&gt;&lt;strong&gt;Pivot Table - After&lt;/strong&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style=&#34;text-align:left&#34;&gt;&lt;img src=&#34;get-the-cell-object-by-displayname-of-pivotfield-of-pivottable_2.png&#34; alt=&#34;todo:image_alt_text&#34;&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;button class=&#34;floating-button&#34; id=&#34;openModalBtn&#34;&gt;AI Document Assistant&lt;/button&gt;

&lt;div class=&#34;modal&#34; id=&#34;modal&#34;&gt;
    &lt;button class=&#34;close-btn&#34; id=&#34;closeModalBtn&#34;&gt;Close&lt;/button&gt;
    &lt;iframe src=&#34;https://products.aspose.ai/cells/chat/document/go?source=docs&#34; frameborder=&#34;0&#34; width=&#34;100%&#34; height=&#34;100%&#34;&gt;&lt;/iframe&gt;
&lt;/div&gt;

&lt;style&gt;
    .floating-button {
        position: fixed;
        bottom: 20px;
        right: 20px;
        background-color: #007bff;
        color: white;
        border: none;
        padding: 15px 20px;
        border-radius: 50px;
        cursor: pointer;
        font-size: 16px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        z-index: 999;
    }

    .modal {
        display: none;
        position: fixed;
        top: 10%;
        left: 10%;
        width: 80%;
        height: 80%;
        background-color: white;
        border: none;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
        z-index: 1000;
        padding: 20px;
        box-sizing: border-box;
    }

    .close-btn {
        position: absolute;
        top: 10px;
        right: 10px;
        background-color: #f44336;
        color: white;
        border: none;
        padding: 5px 10px;
        cursor: pointer;
        font-size: 16px;
        border-radius: 3px;
    }
&lt;/style&gt;

&lt;script&gt;
    const openModalBtn = document.getElementById(&#39;openModalBtn&#39;);
    const closeModalBtn = document.getElementById(&#39;closeModalBtn&#39;);
    const modal = document.getElementById(&#39;modal&#39;);

    openModalBtn.addEventListener(&#39;click&#39;, function() {
        modal.style.display = &#39;block&#39;;
    });

    closeModalBtn.addEventListener(&#39;click&#39;, function() {
        modal.style.display = &#39;none&#39;;
    });

    window.addEventListener(&#39;click&#39;, function(event) {
        if (event.target === modal) {
            modal.style.display = &#39;none&#39;;
        }
    });
&lt;/script&gt;


      </description>
    </item>
    
    <item>
      <title>Gocpp: Group Pivot Fields in the Pivot Table with Golang via C&#43;&#43;</title>
      <link>https://docs.aspose.com/cells/go-cpp/group-pivot-fields-in-the-pivot-table/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://docs.aspose.com/cells/go-cpp/group-pivot-fields-in-the-pivot-table/</guid>
      <description>
        
        
        &lt;h2 id=&#34;possible-usage-scenarios&#34;&gt;&lt;strong&gt;Possible Usage Scenarios&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;Microsoft Excel allows you to group pivot fields &lt;strong&gt;in&lt;/strong&gt; the pivot table. When there is a large amount of data related to a pivot field, it is often useful to group them into sections. Aspose.Cells also provides this feature using the &lt;a href=&#34;https://reference.aspose.com/cells/go-cpp/pivotfield/groupby_double_bool/&#34;&gt;&lt;strong&gt;PivotTable.GroupBy()&lt;/strong&gt;&lt;/a&gt; method.&lt;/p&gt;
&lt;h2 id=&#34;group-pivot-fields-in-the-pivot-table&#34;&gt;&lt;strong&gt;Group Pivot Fields in the Pivot Table&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;The following sample code loads the &lt;a href=&#34;64716818.xlsx&#34;&gt;sample Excel file&lt;/a&gt; and performs grouping on the first pivot field using the &lt;a href=&#34;https://reference.aspose.com/cells/go-cpp/pivotfield/groupby_double_bool/&#34;&gt;&lt;strong&gt;PivotTable.GroupBy()&lt;/strong&gt;&lt;/a&gt; method. It then refreshes the pivot table, calculates its data, and saves the workbook as &lt;a href=&#34;64716817.xlsx&#34;&gt;output Excel file&lt;/a&gt;. The screenshot shows the effect of the sample code on the sample Excel file. As you can see in the screenshot, the first pivot field is now grouped by months and quarters.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;group-pivot-fields-in-the-pivot-table_1.png&#34; alt=&#34;todo:image_alt_text&#34;&gt;&lt;/p&gt;
&lt;h2 id=&#34;sample-code&#34;&gt;&lt;strong&gt;Sample Code&lt;/strong&gt;&lt;/h2&gt;
&lt;script type=&#34;application/javascript&#34; src=&#34;https://gist.github.com/aspose-cells-gists/b414abd53259bbc47d2c3c0fe985395b.js?file=Examples-Go-CPP-GroupPivotFieldsInThePivotTable.go&#34;&gt;&lt;/script&gt;

&lt;button class=&#34;floating-button&#34; id=&#34;openModalBtn&#34;&gt;AI Document Assistant&lt;/button&gt;

&lt;div class=&#34;modal&#34; id=&#34;modal&#34;&gt;
    &lt;button class=&#34;close-btn&#34; id=&#34;closeModalBtn&#34;&gt;Close&lt;/button&gt;
    &lt;iframe src=&#34;https://products.aspose.ai/cells/chat/document/go?source=docs&#34; frameborder=&#34;0&#34; width=&#34;100%&#34; height=&#34;100%&#34;&gt;&lt;/iframe&gt;
&lt;/div&gt;

&lt;style&gt;
    .floating-button {
        position: fixed;
        bottom: 20px;
        right: 20px;
        background-color: #007bff;
        color: white;
        border: none;
        padding: 15px 20px;
        border-radius: 50px;
        cursor: pointer;
        font-size: 16px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        z-index: 999;
    }

    .modal {
        display: none;
        position: fixed;
        top: 10%;
        left: 10%;
        width: 80%;
        height: 80%;
        background-color: white;
        border: none;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
        z-index: 1000;
        padding: 20px;
        box-sizing: border-box;
    }

    .close-btn {
        position: absolute;
        top: 10px;
        right: 10px;
        background-color: #f44336;
        color: white;
        border: none;
        padding: 5px 10px;
        cursor: pointer;
        font-size: 16px;
        border-radius: 3px;
    }
&lt;/style&gt;

&lt;script&gt;
    const openModalBtn = document.getElementById(&#39;openModalBtn&#39;);
    const closeModalBtn = document.getElementById(&#39;closeModalBtn&#39;);
    const modal = document.getElementById(&#39;modal&#39;);

    openModalBtn.addEventListener(&#39;click&#39;, function() {
        modal.style.display = &#39;block&#39;;
    });

    closeModalBtn.addEventListener(&#39;click&#39;, function() {
        modal.style.display = &#39;none&#39;;
    });

    window.addEventListener(&#39;click&#39;, function(event) {
        if (event.target === modal) {
            modal.style.display = &#39;none&#39;;
        }
    });
&lt;/script&gt;


      </description>
    </item>
    
    <item>
      <title>Gocpp: Pivot Table Hide and Sort Data with Golang via C&#43;&#43;</title>
      <link>https://docs.aspose.com/cells/go-cpp/pivot-table-hide-and-sort-data/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://docs.aspose.com/cells/go-cpp/pivot-table-hide-and-sort-data/</guid>
      <description>
        
        
        &lt;h2 id=&#34;pivot-table-hide-and-sort-data&#34;&gt;&lt;strong&gt;Pivot Table Hide and Sort Data&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;Aspose.Cells supports hiding and sorting data in pivot tables. The following code snippet demonstrates this feature by sorting the score column in descending order and then hiding the rows with a score less than 60.&lt;/p&gt;
&lt;script type=&#34;application/javascript&#34; src=&#34;https://gist.github.com/aspose-cells-gists/b414abd53259bbc47d2c3c0fe985395b.js?file=Examples-Go-CPP-PivotTableHideAndSortData.go&#34;&gt;&lt;/script&gt;

&lt;p&gt;The source and output Excel files used in the code snippet are attached for reference.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;96928093.xlsx&#34;&gt;Source File&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;96928094.xlsx&#34;&gt;Output File&lt;/a&gt;&lt;/p&gt;
&lt;button class=&#34;floating-button&#34; id=&#34;openModalBtn&#34;&gt;AI Document Assistant&lt;/button&gt;

&lt;div class=&#34;modal&#34; id=&#34;modal&#34;&gt;
    &lt;button class=&#34;close-btn&#34; id=&#34;closeModalBtn&#34;&gt;Close&lt;/button&gt;
    &lt;iframe src=&#34;https://products.aspose.ai/cells/chat/document/go?source=docs&#34; frameborder=&#34;0&#34; width=&#34;100%&#34; height=&#34;100%&#34;&gt;&lt;/iframe&gt;
&lt;/div&gt;

&lt;style&gt;
    .floating-button {
        position: fixed;
        bottom: 20px;
        right: 20px;
        background-color: #007bff;
        color: white;
        border: none;
        padding: 15px 20px;
        border-radius: 50px;
        cursor: pointer;
        font-size: 16px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        z-index: 999;
    }

    .modal {
        display: none;
        position: fixed;
        top: 10%;
        left: 10%;
        width: 80%;
        height: 80%;
        background-color: white;
        border: none;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
        z-index: 1000;
        padding: 20px;
        box-sizing: border-box;
    }

    .close-btn {
        position: absolute;
        top: 10px;
        right: 10px;
        background-color: #f44336;
        color: white;
        border: none;
        padding: 5px 10px;
        cursor: pointer;
        font-size: 16px;
        border-radius: 3px;
    }
&lt;/style&gt;

&lt;script&gt;
    const openModalBtn = document.getElementById(&#39;openModalBtn&#39;);
    const closeModalBtn = document.getElementById(&#39;closeModalBtn&#39;);
    const modal = document.getElementById(&#39;modal&#39;);

    openModalBtn.addEventListener(&#39;click&#39;, function() {
        modal.style.display = &#39;block&#39;;
    });

    closeModalBtn.addEventListener(&#39;click&#39;, function() {
        modal.style.display = &#39;none&#39;;
    });

    window.addEventListener(&#39;click&#39;, function(event) {
        if (event.target === modal) {
            modal.style.display = &#39;none&#39;;
        }
    });
&lt;/script&gt;


      </description>
    </item>
    
    <item>
      <title>Gocpp: Custom sorting in Pivot Table with Golang via C&#43;&#43;</title>
      <link>https://docs.aspose.com/cells/go-cpp/custom-sorting-in-pivot-table/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://docs.aspose.com/cells/go-cpp/custom-sorting-in-pivot-table/</guid>
      <description>
        
        
        &lt;h2 id=&#34;custom-sorting-in-pivot-table&#34;&gt;&lt;strong&gt;Custom sorting in Pivot Table&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;By using the Aspose.Cells API, you can sort Pivot Tables on field values. The following code snippet loads the sample Excel file and adds three pivot tables. The first pivot table does not use custom sorting, the second pivot table is sorted on &amp;ldquo;Seafood&amp;rdquo; row field values, and the third pivot table is sorted on &amp;ldquo;28/07/2000&amp;rdquo; column field values.&lt;/p&gt;
&lt;p&gt;Sample source file and output files can be downloaded from here for testing the sample code:&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;98107428.xlsx&#34;&gt;Source Excel File&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;98107429.xlsx&#34;&gt;Output Excel File&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;98107430.pdf&#34;&gt;Output PDF File&lt;/a&gt;&lt;/p&gt;
&lt;script type=&#34;application/javascript&#34; src=&#34;https://gist.github.com/aspose-cells-gists/b414abd53259bbc47d2c3c0fe985395b.js?file=Examples-Go-CPP-CustomSortingInPivotTable.go&#34;&gt;&lt;/script&gt;

&lt;button class=&#34;floating-button&#34; id=&#34;openModalBtn&#34;&gt;AI Document Assistant&lt;/button&gt;

&lt;div class=&#34;modal&#34; id=&#34;modal&#34;&gt;
    &lt;button class=&#34;close-btn&#34; id=&#34;closeModalBtn&#34;&gt;Close&lt;/button&gt;
    &lt;iframe src=&#34;https://products.aspose.ai/cells/chat/document/go?source=docs&#34; frameborder=&#34;0&#34; width=&#34;100%&#34; height=&#34;100%&#34;&gt;&lt;/iframe&gt;
&lt;/div&gt;

&lt;style&gt;
    .floating-button {
        position: fixed;
        bottom: 20px;
        right: 20px;
        background-color: #007bff;
        color: white;
        border: none;
        padding: 15px 20px;
        border-radius: 50px;
        cursor: pointer;
        font-size: 16px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        z-index: 999;
    }

    .modal {
        display: none;
        position: fixed;
        top: 10%;
        left: 10%;
        width: 80%;
        height: 80%;
        background-color: white;
        border: none;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
        z-index: 1000;
        padding: 20px;
        box-sizing: border-box;
    }

    .close-btn {
        position: absolute;
        top: 10px;
        right: 10px;
        background-color: #f44336;
        color: white;
        border: none;
        padding: 5px 10px;
        cursor: pointer;
        font-size: 16px;
        border-radius: 3px;
    }
&lt;/style&gt;

&lt;script&gt;
    const openModalBtn = document.getElementById(&#39;openModalBtn&#39;);
    const closeModalBtn = document.getElementById(&#39;closeModalBtn&#39;);
    const modal = document.getElementById(&#39;modal&#39;);

    openModalBtn.addEventListener(&#39;click&#39;, function() {
        modal.style.display = &#39;block&#39;;
    });

    closeModalBtn.addEventListener(&#39;click&#39;, function() {
        modal.style.display = &#39;none&#39;;
    });

    window.addEventListener(&#39;click&#39;, function(event) {
        if (event.target === modal) {
            modal.style.display = &#39;none&#39;;
        }
    });
&lt;/script&gt;


      </description>
    </item>
    
    <item>
      <title>Gocpp: Pivot Filter with Golang via C&#43;&#43;</title>
      <link>https://docs.aspose.com/cells/go-cpp/add-or-clear-pivot-filter/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://docs.aspose.com/cells/go-cpp/add-or-clear-pivot-filter/</guid>
      <description>
        
        
        &lt;h2 id=&#34;possible-usage-scenarios&#34;&gt;&lt;strong&gt;Possible Usage Scenarios&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;When you create a pivot table with known data and want to filter the pivot table, you need to learn and use a filter. It can help you filter out the data you want effectively. By using the Aspose.Cells API, you can add and clear filters on field values in Pivot Tables.&lt;/p&gt;
&lt;h2 id=&#34;add-filter-in-pivot-table-in-excel&#34;&gt;&lt;strong&gt;Add Filter in Pivot Table in Excel&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;Add a filter in a Pivot Table in Excel, follow these steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Select the PivotTable that you want to add a filter to.&lt;/li&gt;
&lt;li&gt;Click on the drop‑down arrow for the filter you want to add in the pivot table.&lt;/li&gt;
&lt;li&gt;Select &lt;strong&gt;Top 10&lt;/strong&gt; from the drop‑down menu.&lt;br&gt;
&lt;br&gt;
&lt;img src=&#34;3.png&#34; width=80% /&gt;&lt;/li&gt;
&lt;li&gt;Set the show mode and the number of items.&lt;br&gt;
&lt;br&gt;
&lt;img src=&#34;4.png&#34; width=80% /&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;add-filter-in-pivot-table&#34;&gt;&lt;strong&gt;Add Filter in Pivot Table&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;Please see the following sample code. It sets the data and creates a PivotTable based on it. Then it adds a filter on the row field of the pivot table. Finally, it saves the workbook in the &lt;a href=&#34;filterout.xlsx&#34;&gt;output XLSX&lt;/a&gt; format. After executing the example code, a pivot table with a Top 10 filter is added to the worksheet.&lt;/p&gt;
&lt;h3 id=&#34;sample-code&#34;&gt;&lt;strong&gt;Sample Code&lt;/strong&gt;&lt;/h3&gt;
&lt;script type=&#34;application/javascript&#34; src=&#34;https://gist.github.com/aspose-cells-gists/b414abd53259bbc47d2c3c0fe985395b.js?file=Examples-Go-CPP-AddFilterInPivotTable.go&#34;&gt;&lt;/script&gt;

&lt;h2 id=&#34;clear-filter-in-pivot-table-in-excel&#34;&gt;&lt;strong&gt;Clear Filter in Pivot Table in Excel&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;Clear a filter in a Pivot Table in Excel, follow these steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Select the PivotTable that you want to clear the filter from.&lt;/li&gt;
&lt;li&gt;Click on the drop‑down arrow for the filter you want to clear in the pivot table.&lt;/li&gt;
&lt;li&gt;Select &lt;strong&gt;Clear Filter&lt;/strong&gt; from the drop‑down menu.&lt;br&gt;
&lt;br&gt;
&lt;img src=&#34;1.png&#34; width=80% /&gt;&lt;/li&gt;
&lt;li&gt;If you want to clear all filters from the pivot table, you can also click the &lt;strong&gt;Clear Filters&lt;/strong&gt; button on the &lt;strong&gt;PivotTable Analyze&lt;/strong&gt; tab of the ribbon in Excel.&lt;br&gt;
&lt;br&gt;
&lt;img src=&#34;2.png&#34; width=80% /&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;clear-filter-in-pivot-table&#34;&gt;&lt;strong&gt;Clear Filter in Pivot Table&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;Clear a filter in a Pivot Table using Aspose.Cells. Please see the following sample code.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Set the data and create a PivotTable based on it.&lt;/li&gt;
&lt;li&gt;Add a filter on the row field of the pivot table.&lt;/li&gt;
&lt;li&gt;Save the workbook in the &lt;a href=&#34;out_add.xlsx&#34;&gt;output XLSX&lt;/a&gt; format. After executing the example code, a pivot table with a Top 10 filter is added to the worksheet.&lt;/li&gt;
&lt;li&gt;Clear the filter on a specific PivotField. After executing the code to clear the filter, the filter on the specific PivotField will be removed. Please check the &lt;a href=&#34;out_delete.xlsx&#34;&gt;output XLSX&lt;/a&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&#34;sample-code-1&#34;&gt;&lt;strong&gt;Sample Code&lt;/strong&gt;&lt;/h3&gt;
&lt;script type=&#34;application/javascript&#34; src=&#34;https://gist.github.com/aspose-cells-gists/b414abd53259bbc47d2c3c0fe985395b.js?file=Examples-Go-CPP-AddFilterInPivotTable-1.go&#34;&gt;&lt;/script&gt;

&lt;button class=&#34;floating-button&#34; id=&#34;openModalBtn&#34;&gt;AI Document Assistant&lt;/button&gt;

&lt;div class=&#34;modal&#34; id=&#34;modal&#34;&gt;
    &lt;button class=&#34;close-btn&#34; id=&#34;closeModalBtn&#34;&gt;Close&lt;/button&gt;
    &lt;iframe src=&#34;https://products.aspose.ai/cells/chat/document/go?source=docs&#34; frameborder=&#34;0&#34; width=&#34;100%&#34; height=&#34;100%&#34;&gt;&lt;/iframe&gt;
&lt;/div&gt;

&lt;style&gt;
    .floating-button {
        position: fixed;
        bottom: 20px;
        right: 20px;
        background-color: #007bff;
        color: white;
        border: none;
        padding: 15px 20px;
        border-radius: 50px;
        cursor: pointer;
        font-size: 16px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        z-index: 999;
    }

    .modal {
        display: none;
        position: fixed;
        top: 10%;
        left: 10%;
        width: 80%;
        height: 80%;
        background-color: white;
        border: none;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
        z-index: 1000;
        padding: 20px;
        box-sizing: border-box;
    }

    .close-btn {
        position: absolute;
        top: 10px;
        right: 10px;
        background-color: #f44336;
        color: white;
        border: none;
        padding: 5px 10px;
        cursor: pointer;
        font-size: 16px;
        border-radius: 3px;
    }
&lt;/style&gt;

&lt;script&gt;
    const openModalBtn = document.getElementById(&#39;openModalBtn&#39;);
    const closeModalBtn = document.getElementById(&#39;closeModalBtn&#39;);
    const modal = document.getElementById(&#39;modal&#39;);

    openModalBtn.addEventListener(&#39;click&#39;, function() {
        modal.style.display = &#39;block&#39;;
    });

    closeModalBtn.addEventListener(&#39;click&#39;, function() {
        modal.style.display = &#39;none&#39;;
    });

    window.addEventListener(&#39;click&#39;, function(event) {
        if (event.target === modal) {
            modal.style.display = &#39;none&#39;;
        }
    });
&lt;/script&gt;


      </description>
    </item>
    
  </channel>
</rss>
