<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Documentation – Insert Slicer with Golang via C&#43;&#43;</title>
    <link>https://docs.aspose.com/cells/go-cpp/create-slicer/</link>
    <description>Recent content in Insert Slicer with Golang 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/create-slicer/index.xml" rel="self" type="application/rss+xml" />
    
    
      
        
      
    
    
    <item>
      <title>Gocpp: Formatting Slicer with Golang via C&#43;&#43;</title>
      <link>https://docs.aspose.com/cells/go-cpp/formatting-slicer/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://docs.aspose.com/cells/go-cpp/formatting-slicer/</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;You can format the slicer in Microsoft Excel by setting its number of columns or by setting its style, etc. Aspose.Cells also allows you to do this using the &lt;a href=&#34;https://reference.aspose.com/cells/go-cpp/slicer/getnumberofcolumns/&#34;&gt;&lt;strong&gt;Slicer.GetNumberOfColumns()&lt;/strong&gt;&lt;/a&gt; and &lt;a href=&#34;https://reference.aspose.com/cells/cpp/aspose.cells.slicers/slicer/getstyletype/&#34;&gt;&lt;strong&gt;Slicer.GetStyleType()&lt;/strong&gt;&lt;/a&gt; properties.&lt;/p&gt;
&lt;h2 id=&#34;formatting-slicer&#34;&gt;&lt;strong&gt;Formatting Slicer&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;Please see the following code; it loads the sample Excel file (67338473.xlsx) that contains a slicer, accesses the slicer, sets its number of columns and style type, and saves it as the output Excel file (67338474.xlsx). The screenshot shows how the slicer looks after the execution of the sample code.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;formatting-slicer_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-FormattingSlicer.go&#34;&gt;&lt;/script&gt;


      </description>
    </item>
    
    <item>
      <title>Gocpp: Add Pivot Connection with Golang via C&#43;&#43;</title>
      <link>https://docs.aspose.com/cells/go-cpp/add-pivot-connection/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://docs.aspose.com/cells/go-cpp/add-pivot-connection/</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;If you want to associate a slicer and a pivot table in Excel, you need to right‑click the slicer and select the &lt;strong&gt;“Report Connections&amp;hellip;”&lt;/strong&gt; item. In the options list, you can check the boxes. Similarly, if you want to associate a slicer and a pivot table using the Aspose.Cells API programmatically, please use the &lt;a href=&#34;https://reference.aspose.com/cells/go-cpp/slicer/addpivotconnection/&#34;&gt;&lt;strong&gt;Slicer.AddPivotConnection(PivotTable pivot)&lt;/strong&gt;&lt;/a&gt; method. It will associate the slicer with the pivot table.&lt;/p&gt;
&lt;h2 id=&#34;associate-slicer-and-pivottable&#34;&gt;&lt;strong&gt;Associate Slicer and PivotTable&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;The following sample code loads the &lt;a href=&#34;add-pivot-connection.xlsx&#34;&gt;sample Excel file&lt;/a&gt; that contains an existing slicer. It accesses the slicer and then associates the slicer with the pivot table. Finally, it saves the workbook as the &lt;a href=&#34;add-pivot-connection-out.xlsx&#34;&gt;output Excel file&lt;/a&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-AddPivotConnection.go&#34;&gt;&lt;/script&gt;


      </description>
    </item>
    
    <item>
      <title>Gocpp: Remove Pivot Connection with Golang via C&#43;&#43;</title>
      <link>https://docs.aspose.com/cells/go-cpp/remove-pivot-connection/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://docs.aspose.com/cells/go-cpp/remove-pivot-connection/</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;If you want to disassociate the slicer and pivot table in Excel, you need to right‑click the slicer and select the &lt;strong&gt;&amp;ldquo;Report Connections&amp;hellip;&amp;quot;&lt;/strong&gt; item. In the options list, you can toggle the check box. Similarly, if you want to disassociate the slicer and pivot table using the Aspose.Cells API programmatically, please use the &lt;a href=&#34;https://reference.aspose.com/cells/go-cpp/slicer/removepivotconnection/&#34;&gt;&lt;strong&gt;Slicer.RemovePivotConnection(PivotTable pivot)&lt;/strong&gt;&lt;/a&gt; method. It will disassociate the slicer and pivot table.&lt;/p&gt;
&lt;h2 id=&#34;disassociate-slicer-and-pivot-table&#34;&gt;&lt;strong&gt;Disassociate slicer and pivot table&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;The following sample code loads the &lt;a href=&#34;remove-pivot-connection.xlsx&#34;&gt;sample Excel file&lt;/a&gt; that contains an existing slicer. It accesses the slicers and then disassociates the slicer from the pivot table. Finally, it saves the workbook as the &lt;a href=&#34;remove-pivot-connection-out.xlsx&#34;&gt;output Excel file&lt;/a&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-RemovePivotConnection.go&#34;&gt;&lt;/script&gt;


      </description>
    </item>
    
    <item>
      <title>Gocpp: Removing Slicer with Golang via C&#43;&#43;</title>
      <link>https://docs.aspose.com/cells/go-cpp/removing-slicer/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://docs.aspose.com/cells/go-cpp/removing-slicer/</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;If you want to remove a slicer in Microsoft Excel, just select it and press the &lt;em&gt;Delete&lt;/em&gt; button. Similarly, if you want to remove it using the Aspose.Cells API programmatically, please use the &lt;a href=&#34;https://reference.aspose.com/cells/go-cpp/slicercollection/remove/&#34;&gt;&lt;strong&gt;Worksheet.Slicers.Remove()&lt;/strong&gt;&lt;/a&gt; method. It will remove the slicer from the worksheet.&lt;/p&gt;
&lt;h2 id=&#34;removing-slicer&#34;&gt;&lt;strong&gt;Removing Slicer&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;The following sample code loads the &lt;a href=&#34;67338478.xlsx&#34;&gt;sample Excel file&lt;/a&gt; that contains an existing slicer. It accesses the slicer and then removes it. Finally, it saves the workbook as the &lt;a href=&#34;67338477.xlsx&#34;&gt;output Excel file&lt;/a&gt;. The following screenshot shows the slicer that will be removed after the execution of the sample code.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;removing-slicer_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-RemovingSlicer.go&#34;&gt;&lt;/script&gt;


      </description>
    </item>
    
    <item>
      <title>Gocpp: Rendering Slicer with Golang via C&#43;&#43;</title>
      <link>https://docs.aspose.com/cells/go-cpp/rendering-slicer/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://docs.aspose.com/cells/go-cpp/rendering-slicer/</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;Aspose.Cells supports the rendering of slicer shapes. If you convert your worksheet into an image or you save your workbook to PDF or HTML formats, you will see that slicers are rendered properly.&lt;/p&gt;
&lt;h2 id=&#34;rendering-slicer&#34;&gt;&lt;strong&gt;Rendering Slicer&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;The following sample code loads the &lt;a href=&#34;67338479.xlsx&#34;&gt;sample Excel file&lt;/a&gt; that contains an existing slicer. It converts the worksheet into an image by setting the print area that covers only the slicer. The following image is the &lt;a href=&#34;67338480.png&#34;&gt;output image&lt;/a&gt; that shows the rendered slicer. As you can see, the slicer has been rendered properly and it looks the same as in the sample Excel file.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;rendering-slicer_1&#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-RenderingSlicer.go&#34;&gt;&lt;/script&gt;


      </description>
    </item>
    
    <item>
      <title>Gocpp: Updating Slicer with Golang via C&#43;&#43;</title>
      <link>https://docs.aspose.com/cells/go-cpp/updating-slicer/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://docs.aspose.com/cells/go-cpp/updating-slicer/</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;If you want to update a slicer in Microsoft Excel by selecting or unselecting its items, it will then update the slicer table or pivot table accordingly. Please use &lt;a href=&#34;https://reference.aspose.com/cells/go-cpp/slicercache/getslicercacheitems/&#34;&gt;&lt;strong&gt;Slicer.GetSlicerCacheItems()&lt;/strong&gt;&lt;/a&gt; to select or unselect slicer items with Aspose.Cells and then call the &lt;a href=&#34;https://reference.aspose.com/cells/cpp/aspose.cells.slicers/slicer/refresh/&#34;&gt;&lt;strong&gt;Slicer.Refresh()&lt;/strong&gt;&lt;/a&gt; method to update the slicer table or pivot table.&lt;/p&gt;
&lt;h2 id=&#34;how-to-update-slicer&#34;&gt;&lt;strong&gt;How to Update Slicer&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;The following sample code loads the &lt;a href=&#34;67338475.xlsx&#34;&gt;sample Excel file&lt;/a&gt; that contains an existing slicer. It unselects the 2nd and 3rd items of the slicer and refreshes the slicer. It then saves the workbook as the &lt;a href=&#34;67338476.xlsx&#34;&gt;output Excel file&lt;/a&gt;. The following screenshot shows the effect of the sample code on the sample Excel file. As you can see in the screenshot, refreshing the slicer with selected items also refreshes the pivot table accordingly.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;updating-slicer_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-UpdatingSlicer.go&#34;&gt;&lt;/script&gt;


      </description>
    </item>
    
    <item>
      <title>Gocpp: Draw Slicer while rendering Excel to PDF with Golang via C&#43;&#43;</title>
      <link>https://docs.aspose.com/cells/go-cpp/draw-slicer-while-rendering-excel-to-pdf/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://docs.aspose.com/cells/go-cpp/draw-slicer-while-rendering-excel-to-pdf/</guid>
      <description>
        
        
        &lt;h2 id=&#34;draw-slicer-while-rendering-excel-to-pdf&#34;&gt;&lt;strong&gt;Draw Slicer while rendering Excel to PDF&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;If you have an Excel file that has a slicer applied to it and you want to export the Excel file to PDF with the slicer settings, Aspose.Cells now supports this by default. You simply export the Excel file with a slicer to PDF, and the generated PDF will show the slicer applied.&lt;/p&gt;
&lt;p&gt;The following sample code loads the &lt;a href=&#34;94044165.xlsx&#34;&gt;sample Excel file&lt;/a&gt; that contains an existing slicer. It then saves the workbook as &lt;a href=&#34;94044166.pdf&#34;&gt;output PDF file&lt;/a&gt;. The following screenshot compares the source Excel file and the generated PDF file.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;draw-slicer-while-rendering-excel-to-pdf_1.jpg&#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-DrawSlicerWhileRenderingExcelToPdf.go&#34;&gt;&lt;/script&gt;


      </description>
    </item>
    
    <item>
      <title>Gocpp: Change Slicer Properties with Golang via C&#43;&#43;</title>
      <link>https://docs.aspose.com/cells/go-cpp/change-slicer-properties/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://docs.aspose.com/cells/go-cpp/change-slicer-properties/</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;There might be situations where you want to change the properties of a slicer, such as its placement or row height. Aspose.Cells provides the option to update these properties.&lt;/p&gt;
&lt;h2 id=&#34;change-slicer-properties&#34;&gt;&lt;strong&gt;Change Slicer Properties&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;Please see the following sample code. It loads the &lt;a href=&#34;sampleCreateSlicerToExcelTable.xlsx&#34;&gt;sample Excel file&lt;/a&gt; that contains a table. It then creates the slicer based on the first column and changes its properties, such as row height, width, printable status, title, etc. It saves the workbook as &lt;a href=&#34;outputChangeSlicerProperties.xlsx&#34;&gt;outputChangeSlicerProperties.xlsx&lt;/a&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-ChangeSlicerProperties.go&#34;&gt;&lt;/script&gt;

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