<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Documentation – Data Filtering with Golang via C&#43;&#43;</title>
    <link>https://docs.aspose.com/cells/go-cpp/data-filtering/</link>
    <description>Recent content in Data Filtering 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/data-filtering/index.xml" rel="self" type="application/rss+xml" />
    
    
      
        
      
    
    
    <item>
      <title>Gocpp: How to Filter Blanks or Non-Blanks with Golang via C&#43;&#43;</title>
      <link>https://docs.aspose.com/cells/go-cpp/how-to-filter-blanks-and-non-blanks/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://docs.aspose.com/cells/go-cpp/how-to-filter-blanks-and-non-blanks/</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;Filtering data in Excel is a valuable tool that enhances data analysis, exploration, and presentation by enabling users to focus on specific subsets of data based on their criteria, making the overall data manipulation and interpretation process more efficient and effective.&lt;/p&gt;
&lt;h2 id=&#34;how-to-filter-blanks-or-non-blanks-in-excel&#34;&gt;&lt;strong&gt;How to Filter Blanks or Non-Blanks in Excel&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;In Excel, you can easily filter blanks or non-blanks using the filtering options. Here&amp;rsquo;s how you can do it:&lt;/p&gt;
&lt;h3 id=&#34;how-to-filter-blanks-in-excel&#34;&gt;&lt;strong&gt;How to Filter Blanks in Excel&lt;/strong&gt;&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Select the Range:&lt;/strong&gt; Click on the letter of the column header to select the entire column or select the range where you want to filter blanks.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Open the Filter Menu:&lt;/strong&gt; Go to the &amp;ldquo;Data&amp;rdquo; tab in the ribbon.&lt;br&gt;
&lt;br&gt;
&lt;image src=&#34;1.png&#34; width=&#34;70%&#34; /&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Filter Options:&lt;/strong&gt; Click on the &amp;ldquo;Filter&amp;rdquo; button. This will add filter arrows to the selected range.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Filter Blanks:&lt;/strong&gt; Click on the filter arrow in the column you want to filter blanks. Unselect all options except &amp;ldquo;Blanks&amp;rdquo; and click OK. This will display only the blank cells in that column.&lt;br&gt;
&lt;br&gt;
&lt;image src=&#34;2.png&#34; width=&#34;70%&#34; /&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The result is as follows:&lt;/strong&gt;&lt;br&gt;
&lt;br&gt;
&lt;image src=&#34;3.png&#34; width=&#34;70%&#34; /&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&#34;how-to-filter-non-blanks-in-excel&#34;&gt;&lt;strong&gt;How to Filter Non-Blanks in Excel&lt;/strong&gt;&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Select the Range:&lt;/strong&gt; Click on the letter of the column header to select the entire column or select the range where you want to filter non-blanks.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Open the Filter Menu:&lt;/strong&gt; Go to the &amp;ldquo;Data&amp;rdquo; tab in the ribbon.&lt;br&gt;
&lt;br&gt;
&lt;image src=&#34;1.png&#34; width=&#34;70%&#34; /&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Filter Options:&lt;/strong&gt; Click on the &amp;ldquo;Filter&amp;rdquo; button. This will add filter arrows to the selected range.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Filter Non-Blanks:&lt;/strong&gt; Click on the filter arrow in the column you want to filter non-blanks. Unselect all options except &amp;ldquo;Non-blanks&amp;rdquo; or &amp;ldquo;Custom&amp;rdquo; and set the conditions accordingly. Click OK. This will display only the cells that are not blank in that column.&lt;br&gt;
&lt;br&gt;
&lt;image src=&#34;4.png&#34; width=&#34;70%&#34; /&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The result is as follows:&lt;/strong&gt;&lt;br&gt;
&lt;br&gt;
&lt;image src=&#34;5.png&#34; width=&#34;70%&#34; /&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;how-to-filter-blanks-using-asposecells&#34;&gt;&lt;strong&gt;How to Filter Blanks using Aspose.Cells&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;If a column contains text such that only a few cells are blank, and a filter is required to select only those rows where blank cells are present, the &lt;a href=&#34;https://reference.aspose.com/cells/go-cpp/autofilter/matchblanks/&#34;&gt;AutoFilter.MatchBlanks(int fieldIndex)&lt;/a&gt; and &lt;a href=&#34;https://reference.aspose.com/cells/cpp/aspose.cells/autofilter/addfilter/&#34;&gt;AutoFilter.AddFilter(int fieldIndex, string criteria)&lt;/a&gt; functions can be used as demonstrated below.&lt;/p&gt;
&lt;p&gt;Please see the following sample code that loads the &lt;a href=&#34;sample.xlsx&#34;&gt;sample Excel file&lt;/a&gt; which contains some dummy data. The sample code uses three methods to filter blanks and then saves the workbook as the &lt;a href=&#34;FilteredBlanks.xlsx&#34;&gt;output Excel 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-FilterBlanksOrNonblanks.go&#34;&gt;&lt;/script&gt;

&lt;h2 id=&#34;how-to-filter-non-blanks-using-asposecells&#34;&gt;&lt;strong&gt;How to Filter Non-Blanks using Aspose.Cells&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;Please see the following sample code that loads the &lt;a href=&#34;sample.xlsx&#34;&gt;sample Excel file&lt;/a&gt; which contains some dummy data. After loading the file, call the &lt;a href=&#34;https://reference.aspose.com/cells/cpp/aspose.cells/autofilter/matchnonblanks/&#34;&gt;AutoFilter.MatchNonBlanks(int fieldIndex)&lt;/a&gt; function to filter non‑blank data, and finally save the workbook as the &lt;a href=&#34;FilteredNonBlanks.xlsx&#34;&gt;output Excel 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-FilterBlanksOrNonblanks-1.go&#34;&gt;&lt;/script&gt;


      </description>
    </item>
    
    <item>
      <title>Gocpp: Apply Advanced Filter of Microsoft Excel to Display Records Meeting Complex Criteria with Golang via C&#43;&#43;</title>
      <link>https://docs.aspose.com/cells/go-cpp/apply-advanced-filter-of-microsoft-excel-to-display-records-meeting-complex-criteria/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://docs.aspose.com/cells/go-cpp/apply-advanced-filter-of-microsoft-excel-to-display-records-meeting-complex-criteria/</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 apply &lt;em&gt;Advanced Filter&lt;/em&gt; on worksheet data to display records that meet complex criteria. You can apply Advanced Filter with Microsoft Excel via its &lt;em&gt;Data &amp;gt; Advanced&lt;/em&gt; command as shown in this screenshot.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;apply-advanced-filter-of-microsoft-excel-to-display-records-meeting-complex-criteria_1.png&#34; alt=&#34;todo:image_alt_text&#34;&gt;&lt;/p&gt;
&lt;p&gt;Aspose.Cells also allows you to apply the Advanced Filter using the &lt;a href=&#34;https://reference.aspose.com/cells/go-cpp/worksheet/getadvancedfilter/&#34;&gt;&lt;strong&gt;GetAdvancedFilter()&lt;/strong&gt;&lt;/a&gt; method. Like Microsoft Excel, it accepts the following parameters.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;isFilter&lt;/strong&gt;&lt;br&gt;
Indicates whether to filter the list in place.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;listRange&lt;/strong&gt;&lt;br&gt;
The list range.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;criteriaRange&lt;/strong&gt;&lt;br&gt;
The criteria range.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;copyTo&lt;/strong&gt;&lt;br&gt;
The range to which data will be copied.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;uniqueRecordOnly&lt;/strong&gt;&lt;br&gt;
Specifies whether to display or copy only unique rows.&lt;/p&gt;
&lt;h2 id=&#34;apply-advanced-filter-of-microsoft-excel-to-display-records-meeting-complex-criteria&#34;&gt;&lt;strong&gt;Apply Advanced Filter of Microsoft Excel to Display Records Meeting Complex Criteria&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;The following sample code applies the advanced filter to the &lt;a href=&#34;48496692.xlsx&#34;&gt;Sample Excel File&lt;/a&gt; and generates the &lt;a href=&#34;48496691.xlsx&#34;&gt;Output Excel File&lt;/a&gt;. The screenshot shows both files for comparison. As you can see in the screenshot, the data has been filtered in the output Excel file according to complex criteria.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;apply-advanced-filter-of-microsoft-excel-to-display-records-meeting-complex-criteria_2.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-ApplyAdvancedFilterOfMicrosoftExcelToDisplayRecordsMeetingComplexCriteria.go&#34;&gt;&lt;/script&gt;


      </description>
    </item>
    
    <item>
      <title>Gocpp: Get All Hidden Rows Indices after Refreshing AutoFilter with Golang via C&#43;&#43;</title>
      <link>https://docs.aspose.com/cells/go-cpp/get-all-hidden-rows-indices-after-refreshing-autofilter/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://docs.aspose.com/cells/go-cpp/get-all-hidden-rows-indices-after-refreshing-autofilter/</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 apply the AutoFilter on worksheet cells, some of the rows get hidden automatically. However, it might be the case that some rows are already hidden manually by an Excel end‑user and are not hidden by an AutoFilter. It therefore makes it difficult to know which rows are hidden by the AutoFilter and which are hidden manually by the Excel end‑user. Aspose.Cells deals with this problem using the int[] &lt;a href=&#34;https://reference.aspose.com/cells/go-cpp/autofilter/refresh/&#34;&gt;&lt;strong&gt;AutoFilter.Refresh(bool hideRows)&lt;/strong&gt;&lt;/a&gt; method. This method returns the row indices of all the rows hidden by the AutoFilter and not manually by the Excel end‑user.&lt;/p&gt;
&lt;h2 id=&#34;get-all-hidden-rows-indices-after-refreshing-autofilter&#34;&gt;&lt;strong&gt;Get All Hidden Rows Indices after Refreshing AutoFilter&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;Please see the following sample code that loads the &lt;a href=&#34;64716909.xlsx&#34;&gt;sample Excel file&lt;/a&gt; which contains some rows hidden manually by an Excel end‑user. The code applies the AutoFilter and refreshes it using the int[] &lt;a href=&#34;https://reference.aspose.com/cells/go-cpp/autofilter/refresh/&#34;&gt;&lt;strong&gt;AutoFilter.Refresh(bool hideRows)&lt;/strong&gt;&lt;/a&gt; method, which returns the row indices of all the rows hidden by the AutoFilter. It then prints the indices of the hidden rows on the console along with cell names and values.&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-GetAllHiddenRowsIndicesAfterRefreshingAutofilter.go&#34;&gt;&lt;/script&gt;

&lt;h2 id=&#34;console-output&#34;&gt;&lt;strong&gt;Console Output&lt;/strong&gt;&lt;/h2&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;&lt;span class=&#34;n&#34;&gt;Printing&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Rows&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Indices&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Cell&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Names&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;and&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Values&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Hidden&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;By&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;AutoFilter&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;

&lt;span class=&#34;err&#34;&gt;\&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;--------------------------&lt;/span&gt;

&lt;span class=&#34;n&#34;&gt;1&lt;/span&gt;       &lt;span class=&#34;n&#34;&gt;A2&lt;/span&gt;      &lt;span class=&#34;n&#34;&gt;Apple&lt;/span&gt;

&lt;span class=&#34;n&#34;&gt;2&lt;/span&gt;       &lt;span class=&#34;n&#34;&gt;A3&lt;/span&gt;      &lt;span class=&#34;n&#34;&gt;Apple&lt;/span&gt;

&lt;span class=&#34;n&#34;&gt;3&lt;/span&gt;       &lt;span class=&#34;n&#34;&gt;A4&lt;/span&gt;      &lt;span class=&#34;n&#34;&gt;Apple&lt;/span&gt;

&lt;span class=&#34;n&#34;&gt;6&lt;/span&gt;       &lt;span class=&#34;n&#34;&gt;A7&lt;/span&gt;      &lt;span class=&#34;n&#34;&gt;Apple&lt;/span&gt;

&lt;span class=&#34;n&#34;&gt;7&lt;/span&gt;       &lt;span class=&#34;n&#34;&gt;A8&lt;/span&gt;      &lt;span class=&#34;n&#34;&gt;Apple&lt;/span&gt;

&lt;span class=&#34;n&#34;&gt;11&lt;/span&gt;      &lt;span class=&#34;n&#34;&gt;A12&lt;/span&gt;     &lt;span class=&#34;n&#34;&gt;Pear&lt;/span&gt;

&lt;span class=&#34;n&#34;&gt;12&lt;/span&gt;      &lt;span class=&#34;n&#34;&gt;A13&lt;/span&gt;     &lt;span class=&#34;n&#34;&gt;Pear&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

      </description>
    </item>
    
  </channel>
</rss>
