<?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 check if column exists in excel file in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/How-to-check-if-column-exists-in-excel-file/m-p/2247937#M32949</link>
    <description>Well lol, that's not going to be that easy.&lt;BR /&gt;Talend stick with the column order, because files haven't necessarily a header, or he can be false.&lt;BR /&gt;First of all, i think you need to convert it into csv, easier to manipulate.&lt;BR /&gt;So you probably want to test only first line of file, and to adapt your file to this.&lt;BR /&gt;Like this : you compare your header with the schema and if column 2, 4 and 5 are missing, you open you file without defining column separator and add your real column separator to simulate a null column to each rows.&lt;BR /&gt;Excel isn't really your friend in this.&amp;nbsp;&lt;BR /&gt;Tell me if that may work for you.</description>
    <pubDate>Tue, 22 Dec 2015 14:22:33 GMT</pubDate>
    <dc:creator>Franz3</dc:creator>
    <dc:date>2015-12-22T14:22:33Z</dc:date>
    <item>
      <title>How to check if column exists in excel file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-check-if-column-exists-in-excel-file/m-p/2247933#M32945</link>
      <description>Hi,
&lt;BR /&gt;I have a requirement where we are loading a set of excel files to DB. But one or two columns may be missing in the file. If that is the case, where a column is missing we have to insert a column with Null values.
&lt;BR /&gt;Please&amp;nbsp;let me know how&amp;nbsp;do I check this. Thanks in advance.
&lt;BR /&gt;To be more precise, in Talend we have defined Col1, Col2, Col3, .. Col10. But in excel file Col3 is missing. So in that case the job has to insert a new Column Col3 with null values.
&lt;BR /&gt;Regards,
&lt;BR /&gt;Rashmitha</description>
      <pubDate>Wed, 09 Dec 2015 09:35:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-check-if-column-exists-in-excel-file/m-p/2247933#M32945</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-12-09T09:35:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to check if column exists in excel file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-check-if-column-exists-in-excel-file/m-p/2247934#M32946</link>
      <description>Hi, 
&lt;BR /&gt;The missing one is null or empty string? Could you please try to&amp;nbsp; use row1.Column==null||row1.Column.equals("")?"null":row1.Column in tMap to see if it is OK with you? 
&lt;BR /&gt;Best ergards 
&lt;BR /&gt;Sabrina 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MCeY.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/129284i9DAEEC169FC2F550/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MCeY.png" alt="0683p000009MCeY.png" /&gt;&lt;/span&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MCed.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/157048i2A8B2D8F0A1F2873/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MCed.png" alt="0683p000009MCed.png" /&gt;&lt;/span&gt;</description>
      <pubDate>Thu, 10 Dec 2015 10:15:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-check-if-column-exists-in-excel-file/m-p/2247934#M32946</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-12-10T10:15:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to check if column exists in excel file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-check-if-column-exists-in-excel-file/m-p/2247935#M32947</link>
      <description>Thank you for your reply. But probably you got my question wrong.&lt;BR /&gt;I have a Excel Input component with schema defined as follows:&lt;BR /&gt;&lt;B&gt;Name&lt;/B&gt;&amp;nbsp;&amp;nbsp; Type-&lt;B&gt;String&lt;/B&gt;&lt;BR /&gt;&lt;B&gt;ID&lt;/B&gt; type-&lt;B&gt;Integer&lt;/B&gt;&lt;BR /&gt;&lt;B&gt;Location&lt;/B&gt; Type-&lt;B&gt;String&lt;/B&gt;&lt;BR /&gt;But in my excel file if Column&amp;nbsp;&lt;B&gt;ID &lt;/B&gt;is missing, Talend reads&amp;nbsp;&lt;B&gt;Location&lt;/B&gt; Column which is type &lt;B&gt;String&lt;/B&gt; as &lt;B&gt;ID&lt;/B&gt; Column and throws an error.&amp;nbsp; So I want to check if ID column exists in file and if it does not exist, I want to insert a new column ID with NULL values.&lt;BR /&gt;Hope the scenario is clear now. Awaiting a reply.&lt;BR /&gt;Regards,&lt;BR /&gt;Rashmitha.B</description>
      <pubDate>Thu, 10 Dec 2015 11:10:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-check-if-column-exists-in-excel-file/m-p/2247935#M32947</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-12-10T11:10:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to check if column exists in excel file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-check-if-column-exists-in-excel-file/m-p/2247936#M32948</link>
      <description>Does anyone has any reply for this question?</description>
      <pubDate>Tue, 22 Dec 2015 13:34:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-check-if-column-exists-in-excel-file/m-p/2247936#M32948</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-12-22T13:34:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to check if column exists in excel file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-check-if-column-exists-in-excel-file/m-p/2247937#M32949</link>
      <description>Well lol, that's not going to be that easy.&lt;BR /&gt;Talend stick with the column order, because files haven't necessarily a header, or he can be false.&lt;BR /&gt;First of all, i think you need to convert it into csv, easier to manipulate.&lt;BR /&gt;So you probably want to test only first line of file, and to adapt your file to this.&lt;BR /&gt;Like this : you compare your header with the schema and if column 2, 4 and 5 are missing, you open you file without defining column separator and add your real column separator to simulate a null column to each rows.&lt;BR /&gt;Excel isn't really your friend in this.&amp;nbsp;&lt;BR /&gt;Tell me if that may work for you.</description>
      <pubDate>Tue, 22 Dec 2015 14:22:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-check-if-column-exists-in-excel-file/m-p/2247937#M32949</guid>
      <dc:creator>Franz3</dc:creator>
      <dc:date>2015-12-22T14:22:33Z</dc:date>
    </item>
  </channel>
</rss>

