<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to get total count of Excel File in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/How-to-get-total-count-of-Excel-File/m-p/2313443#M84299</link>
    <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/0053p000007LMKXAA4"&gt;@mhodent&lt;/A&gt;&amp;nbsp;cnt type is of String&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Job" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M72p.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/134156i3BC2FF44A104D55B/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M72p.jpg" alt="0683p000009M72p.jpg" /&gt;&lt;/span&gt;&lt;SPAN class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Job&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tJavaRow(cnt variable)" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M7Gg.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/135577i234E3161D10C6BD9/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M7Gg.jpg" alt="0683p000009M7Gg.jpg" /&gt;&lt;/span&gt;&lt;SPAN class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;tJavaRow(cnt variable)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/0053p000007LLBLAA4"&gt;@ankit7359&lt;/A&gt;&amp;nbsp;Can you please provide exact syntax on how to use global variable NB line in this scenario&lt;/P&gt;</description>
    <pubDate>Wed, 11 Sep 2019 18:40:49 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-09-11T18:40:49Z</dc:date>
    <item>
      <title>How to get total count of Excel File</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-get-total-count-of-Excel-File/m-p/2313440#M84296</link>
      <description>&lt;P&gt;I want to display the number of rows in an Excel File (.xlsx)&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Tried to use tFileRowCount component but it throws an error:&amp;nbsp;&lt;SPAN&gt;java.lang.RuntimeException: not support excel 2007".&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;So tried a solution which&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/0053p000007LLmlAAG"&gt;@sanvaibhav&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Four-Stars lia-component-message-view-widget-author-username"&gt;&lt;SPAN class=""&gt;Had suggested in a post:&amp;nbsp;&amp;nbsp;&lt;A href="https://community.qlik.com/s/feed/0D53p00007vCo4lCAC" target="_blank" rel="noopener"&gt;https://community.talend.com/t5/Design-and-Development/Error-in-tFileRowCount/td-p/92065&lt;/A&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;STRONG&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Four-Stars lia-component-message-view-widget-author-username"&gt;&lt;SPAN class=""&gt;context.cnt=context.cnt+1 &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Four-Stars lia-component-message-view-widget-author-username"&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;but above prints concatenated result&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Four-Stars lia-component-message-view-widget-author-username"&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;Example if there are 5 rows in excel file its prints 11111&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Four-Stars lia-component-message-view-widget-author-username"&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;Rather I want it to print directly 5&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Sep 2019 13:27:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-get-total-count-of-Excel-File/m-p/2313440#M84296</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-09-11T13:27:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to get total count of Excel File</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-get-total-count-of-Excel-File/m-p/2313441#M84297</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Strange ! It should have worked.&lt;BR /&gt;Can you show us a screenshot of this part of the job and the type of your "cnt" context variable ?</description>
      <pubDate>Wed, 11 Sep 2019 14:19:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-get-total-count-of-Excel-File/m-p/2313441#M84297</guid>
      <dc:creator>rmartin2</dc:creator>
      <dc:date>2019-09-11T14:19:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to get total count of Excel File</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-get-total-count-of-Excel-File/m-p/2313442#M84298</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/0053p000007LLtIAAW"&gt;@Vikas&lt;/A&gt;&amp;nbsp;,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;You can use Global Variable - NB_Line to capture the counts/number of lines in the excel files.&lt;/P&gt; 
&lt;P&gt;Pls post a screenshot of your Job design which could help further solve the issue.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Thanks,&lt;/P&gt; 
&lt;P&gt;Ankit.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Sep 2019 14:43:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-get-total-count-of-Excel-File/m-p/2313442#M84298</guid>
      <dc:creator>ankit7359</dc:creator>
      <dc:date>2019-09-11T14:43:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to get total count of Excel File</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-get-total-count-of-Excel-File/m-p/2313443#M84299</link>
      <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/0053p000007LMKXAA4"&gt;@mhodent&lt;/A&gt;&amp;nbsp;cnt type is of String&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Job" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M72p.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/134156i3BC2FF44A104D55B/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M72p.jpg" alt="0683p000009M72p.jpg" /&gt;&lt;/span&gt;&lt;SPAN class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Job&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tJavaRow(cnt variable)" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M7Gg.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/135577i234E3161D10C6BD9/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M7Gg.jpg" alt="0683p000009M7Gg.jpg" /&gt;&lt;/span&gt;&lt;SPAN class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;tJavaRow(cnt variable)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/0053p000007LLBLAA4"&gt;@ankit7359&lt;/A&gt;&amp;nbsp;Can you please provide exact syntax on how to use global variable NB line in this scenario&lt;/P&gt;</description>
      <pubDate>Wed, 11 Sep 2019 18:40:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-get-total-count-of-Excel-File/m-p/2313443#M84299</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-09-11T18:40:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to get total count of Excel File</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-get-total-count-of-Excel-File/m-p/2313444#M84300</link>
      <description>&lt;P&gt;Ah, it's normal so !&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;You need to have an "Integer|int" type, and start it at zero.&lt;/P&gt; 
&lt;P&gt;Else it is doing that :&lt;/P&gt; 
&lt;P&gt;""&lt;/P&gt; 
&lt;P&gt;""+1 = "1"&lt;/P&gt; 
&lt;P&gt;"1"+1="11"&lt;/P&gt; 
&lt;P&gt;"11"+1="111"&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;There's an autocast of 1 because cnt is a String !&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;EDIT : anyway, you should use &lt;A href="https://community.qlik.com/s/profile/0053p000007LLBLAA4"&gt;@ankit7359&lt;/A&gt; solution. It's simpler and better : on the bottom part of the Studio, drag and drop the "Number of Line (AFTER)" variable into any tJava.&lt;/P&gt; 
&lt;P&gt;So it's tFileInputExcel==&amp;gt;OnComponentOk==&amp;gt;tJava (with the variable)&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;You will see a globalMap.get function used to retrieve your info&lt;/P&gt;</description>
      <pubDate>Wed, 11 Sep 2019 18:58:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-get-total-count-of-Excel-File/m-p/2313444#M84300</guid>
      <dc:creator>rmartin2</dc:creator>
      <dc:date>2019-09-11T18:58:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to get total count of Excel File</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-get-total-count-of-Excel-File/m-p/2313445#M84301</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/0053p000007LMKXAA4"&gt;@mhodent&lt;/A&gt;&amp;nbsp;and&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/0053p000007LLBLAA4"&gt;@ankit7359&lt;/A&gt;&amp;nbsp; It worked.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I am sharing the screenshot of updated job design, might help someone with a similar issue.&lt;/P&gt; 
&lt;P&gt;In tJava (DisplayCount) component added below code:&amp;nbsp;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;System.out.println("Number of Rows in Excel -&amp;gt; " + ((Integer)globalMap.get("tFileInputExcel_1_NB_LINE")));&lt;/PRE&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Updated_Job" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M768.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/141379i1289B673874D2655/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M768.jpg" alt="0683p000009M768.jpg" /&gt;&lt;/span&gt;&lt;SPAN class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Updated_Job&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Sep 2019 11:59:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-get-total-count-of-Excel-File/m-p/2313445#M84301</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-09-12T11:59:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to get total count of Excel File</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-get-total-count-of-Excel-File/m-p/2313446#M84302</link>
      <description>You don't even need the tJava_2.&lt;BR /&gt;Your file will be read anyway !</description>
      <pubDate>Thu, 12 Sep 2019 14:16:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-get-total-count-of-Excel-File/m-p/2313446#M84302</guid>
      <dc:creator>rmartin2</dc:creator>
      <dc:date>2019-09-12T14:16:59Z</dc:date>
    </item>
  </channel>
</rss>

