<?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: Convert Excel file to CSV file whose metadata varies each month in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Convert-Excel-file-to-CSV-file-whose-metadata-varies-each-month/m-p/2285012#M58634</link>
    <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/0053p000007LMhCAAW"&gt;@MNREDDY&lt;/A&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;There is no single component to do so&amp;nbsp; but you could program it , thanks to tFileexcelInput , Start and end column Properties .&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;1) Read 1st 7 key column. Add sequence number&lt;/P&gt; 
&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;SEQNO &lt;/STRONG&gt;&lt;/U&gt;CUSTID CUSTNAME DOB GENDER StepFlag PreviousStepFlag&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;2) You could &lt;U&gt;get number of Column&lt;/U&gt; in excel using below command&lt;/P&gt; 
&lt;P&gt;new org.apache.poi.xssf.usermodel.XSSFWorkbook((String)globalMap.get("filename")).getSheet("&lt;EM&gt;SheetName&lt;/EM&gt;").getRow(&lt;EM&gt;rownumber&lt;/EM&gt;).getLastCellNum()&lt;/P&gt; 
&lt;P&gt;3) Now as you know column count , you could read columns in loop with set of 50 (thanks to tFileexcelInput , Start and last column Properties ).&lt;/P&gt; 
&lt;P&gt;e.g. if number of &lt;U&gt;&lt;STRONG&gt;code &lt;/STRONG&gt;&lt;/U&gt;columns is 60 , read 1st 50 &lt;STRONG&gt;code&lt;/STRONG&gt; columns( startcolumn 8 ,endColumn 58) and next iteration 10 ( startcolumn 58 , endColumn 108)&lt;/P&gt; 
&lt;P&gt;4)&lt;/P&gt; 
&lt;P&gt;4.1) while reading , again add SEQNO&lt;/P&gt; 
&lt;P&gt;SEQNO CODE1 CODE2 CODE3 CODE4 ...&lt;/P&gt; 
&lt;P&gt;4.2) normalize the result&amp;nbsp; ( tSplitRow)&lt;/P&gt; 
&lt;P&gt;SEQNO CODE1&lt;/P&gt; 
&lt;P&gt;SEQNO CODE2&lt;/P&gt; 
&lt;P&gt;SEQNO CODE3&lt;/P&gt; 
&lt;P&gt;4.3) you can use tMap to do inner join(all match) between step1 and step 4.2 result on &lt;U&gt;&lt;STRONG&gt;SEQNO &lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt; 
&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;SEQNO &lt;/STRONG&gt;&lt;/U&gt;CUSTID CUSTNAME DOB GENDER StepFlag PreviousStepFlag CODE1value&lt;/P&gt; 
&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;SEQNO &lt;/STRONG&gt;&lt;/U&gt;CUSTID CUSTNAME DOB GENDER StepFlag PreviousStepFlag CODE2value&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Above result you can update on table.&lt;/P&gt; 
&lt;P&gt;Hope this will be helpful to start.Let me know if you face problem.&lt;/P&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;</description>
    <pubDate>Sun, 24 Feb 2019 19:13:09 GMT</pubDate>
    <dc:creator>akumar2301</dc:creator>
    <dc:date>2019-02-24T19:13:09Z</dc:date>
    <item>
      <title>Convert Excel file to CSV file whose metadata varies each month</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Convert-Excel-file-to-CSV-file-whose-metadata-varies-each-month/m-p/2285010#M58632</link>
      <description>&lt;P&gt;Hello Team,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a requirement like every month we get excel file and we need convert this into csv file for further process. Source and Target file structure like below.&lt;/P&gt;
&lt;P&gt;Month 1:&lt;BR /&gt;SourceFile.xlsx&lt;BR /&gt;CUSTID,CUSTNAME,DOB,GENDER,StepFlag,PreviousStepFlag,CODE1,CODE2,CODE3,CODE4&lt;/P&gt;
&lt;P&gt;TargetFile.csv&lt;BR /&gt;CUSTID,CUSTNAME,DOB,GENDER,StepFlag,PreviousStepFlag,CODE1,CODE2,CODE3,CODE4&lt;/P&gt;
&lt;P&gt;Month 2:&lt;BR /&gt;SourceFile.xlsx&lt;BR /&gt;CUSTID,CUSTNAME,DOB,GENDER,StepFlag,PreviousStepFlag,CODE2,CODE4,CODE5,CODE6,CODE7,CODE10&lt;/P&gt;
&lt;P&gt;TargetFile.csv&lt;BR /&gt;CUSTID,CUSTNAME,DOB,GENDER,StepFlag,PreviousStepFlag,CODE2,CODE4,CODE5,CODE6,CODE7,CODE10&lt;/P&gt;
&lt;P&gt;Note: We would get every time more than 100 codes in the excel file. Also actual header starts from B8 cell in the excel.&lt;/P&gt;
&lt;P&gt;But we shouldn't change the schema metadata&amp;nbsp; for every monthly run.&lt;/P&gt;
&lt;P&gt;Once we loaded to csv file, then it should load into DB table and It is like below&amp;nbsp;&lt;/P&gt;
&lt;P&gt;CUSTID,CUSTNAME,DOB,GENDER,StepFlag,PreviousStepFlag,CODE&lt;/P&gt;
&lt;P&gt;For each code 1 record to be inserted, for 4 codes 4 records to be inserted, 6 codes 6 records to be inserted, n codes n records to be inserted.&lt;/P&gt;
&lt;P&gt;Please help us to handle this scenario.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;NarsimhaReddy&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 06:31:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Convert-Excel-file-to-CSV-file-whose-metadata-varies-each-month/m-p/2285010#M58632</guid>
      <dc:creator>MNREDDY</dc:creator>
      <dc:date>2024-11-16T06:31:11Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Excel file to CSV file whose metadata varies each month</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Convert-Excel-file-to-CSV-file-whose-metadata-varies-each-month/m-p/2285011#M58633</link>
      <description>You can use Dynamic schema feature of the Talend Enterprise Edition</description>
      <pubDate>Sat, 23 Feb 2019 01:13:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Convert-Excel-file-to-CSV-file-whose-metadata-varies-each-month/m-p/2285011#M58633</guid>
      <dc:creator>dipanjan93</dc:creator>
      <dc:date>2019-02-23T01:13:58Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Excel file to CSV file whose metadata varies each month</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Convert-Excel-file-to-CSV-file-whose-metadata-varies-each-month/m-p/2285012#M58634</link>
      <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/0053p000007LMhCAAW"&gt;@MNREDDY&lt;/A&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;There is no single component to do so&amp;nbsp; but you could program it , thanks to tFileexcelInput , Start and end column Properties .&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;1) Read 1st 7 key column. Add sequence number&lt;/P&gt; 
&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;SEQNO &lt;/STRONG&gt;&lt;/U&gt;CUSTID CUSTNAME DOB GENDER StepFlag PreviousStepFlag&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;2) You could &lt;U&gt;get number of Column&lt;/U&gt; in excel using below command&lt;/P&gt; 
&lt;P&gt;new org.apache.poi.xssf.usermodel.XSSFWorkbook((String)globalMap.get("filename")).getSheet("&lt;EM&gt;SheetName&lt;/EM&gt;").getRow(&lt;EM&gt;rownumber&lt;/EM&gt;).getLastCellNum()&lt;/P&gt; 
&lt;P&gt;3) Now as you know column count , you could read columns in loop with set of 50 (thanks to tFileexcelInput , Start and last column Properties ).&lt;/P&gt; 
&lt;P&gt;e.g. if number of &lt;U&gt;&lt;STRONG&gt;code &lt;/STRONG&gt;&lt;/U&gt;columns is 60 , read 1st 50 &lt;STRONG&gt;code&lt;/STRONG&gt; columns( startcolumn 8 ,endColumn 58) and next iteration 10 ( startcolumn 58 , endColumn 108)&lt;/P&gt; 
&lt;P&gt;4)&lt;/P&gt; 
&lt;P&gt;4.1) while reading , again add SEQNO&lt;/P&gt; 
&lt;P&gt;SEQNO CODE1 CODE2 CODE3 CODE4 ...&lt;/P&gt; 
&lt;P&gt;4.2) normalize the result&amp;nbsp; ( tSplitRow)&lt;/P&gt; 
&lt;P&gt;SEQNO CODE1&lt;/P&gt; 
&lt;P&gt;SEQNO CODE2&lt;/P&gt; 
&lt;P&gt;SEQNO CODE3&lt;/P&gt; 
&lt;P&gt;4.3) you can use tMap to do inner join(all match) between step1 and step 4.2 result on &lt;U&gt;&lt;STRONG&gt;SEQNO &lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt; 
&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;SEQNO &lt;/STRONG&gt;&lt;/U&gt;CUSTID CUSTNAME DOB GENDER StepFlag PreviousStepFlag CODE1value&lt;/P&gt; 
&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;SEQNO &lt;/STRONG&gt;&lt;/U&gt;CUSTID CUSTNAME DOB GENDER StepFlag PreviousStepFlag CODE2value&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Above result you can update on table.&lt;/P&gt; 
&lt;P&gt;Hope this will be helpful to start.Let me know if you face problem.&lt;/P&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;</description>
      <pubDate>Sun, 24 Feb 2019 19:13:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Convert-Excel-file-to-CSV-file-whose-metadata-varies-each-month/m-p/2285012#M58634</guid>
      <dc:creator>akumar2301</dc:creator>
      <dc:date>2019-02-24T19:13:09Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Excel file to CSV file whose metadata varies each month</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Convert-Excel-file-to-CSV-file-whose-metadata-varies-each-month/m-p/2285013#M58635</link>
      <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/0053p000007LOaiAAG"&gt;@dipanjan93&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;We have tried this option, but&amp;nbsp; it is unable to recognize all the columns as we have 90 columns in the sheet. It is reading 12 columns only.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;NarsimhaReddy&lt;/P&gt;</description>
      <pubDate>Wed, 27 Feb 2019 12:58:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Convert-Excel-file-to-CSV-file-whose-metadata-varies-each-month/m-p/2285013#M58635</guid>
      <dc:creator>MNREDDY</dc:creator>
      <dc:date>2019-02-27T12:58:58Z</dc:date>
    </item>
  </channel>
</rss>

