<?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 Talend Routine Not working for POIFileSystem in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Talend-Routine-Not-working-for-POIFileSystem/m-p/2295351#M68135</link>
    <description>&lt;P&gt;I have an requirement to process .xlsx file which is password protected. I have used below code to&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;POIFSFileSystem fileSystem = new POIFSFileSystem(new File(excelFilePath));&lt;/P&gt; 
&lt;P&gt;EncryptionInfo info = new EncryptionInfo(fileSystem);&lt;BR /&gt;Decryptor d = Decryptor.getInstance(info);&lt;/P&gt; 
&lt;P&gt;try {&lt;BR /&gt;if (!d.verifyPassword("xyz")) {&lt;BR /&gt;throw new RuntimeException("Unable to process: document is encrypted");&lt;BR /&gt;&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;catch (GeneralSecurityException ex) {&lt;BR /&gt;throw new RuntimeException("Unable to process encrypted document", ex);&lt;BR /&gt;}&lt;/P&gt; 
&lt;P&gt;OPCPackage dataStream = OPCPackage.open (d.getDataStream(fileSystem)) ;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Getting error :&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;The supplied data appears to be in the Office 2007+ XML. You are calling the part of POI that deals with OLE2 Office Documents. You need to call a different part of POI to process this data (eg XSSF instead of HSSF)&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;The same code works fine in Eclipse, But Not woking in Talend.&lt;/P&gt; 
&lt;P&gt;I have used below Jars in Eclipse and Talend&lt;/P&gt; 
&lt;P&gt;commons-collections4-4.1&lt;/P&gt; 
&lt;P&gt;poi-3.17&lt;/P&gt; 
&lt;P&gt;poi-ooxml-3.17&lt;/P&gt; 
&lt;P&gt;poi-ooxml-schemas-3.17&lt;/P&gt; 
&lt;P&gt;xerces-2.9.0&lt;/P&gt; 
&lt;P&gt;xmlbeans-2.6.0&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Please suggest if any Jar should be updated / added for the code to work in Talend&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;// The package open is instantaneous, as it should be.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 08:21:04 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-11-16T08:21:04Z</dc:date>
    <item>
      <title>Talend Routine Not working for POIFileSystem</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Talend-Routine-Not-working-for-POIFileSystem/m-p/2295351#M68135</link>
      <description>&lt;P&gt;I have an requirement to process .xlsx file which is password protected. I have used below code to&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;POIFSFileSystem fileSystem = new POIFSFileSystem(new File(excelFilePath));&lt;/P&gt; 
&lt;P&gt;EncryptionInfo info = new EncryptionInfo(fileSystem);&lt;BR /&gt;Decryptor d = Decryptor.getInstance(info);&lt;/P&gt; 
&lt;P&gt;try {&lt;BR /&gt;if (!d.verifyPassword("xyz")) {&lt;BR /&gt;throw new RuntimeException("Unable to process: document is encrypted");&lt;BR /&gt;&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;catch (GeneralSecurityException ex) {&lt;BR /&gt;throw new RuntimeException("Unable to process encrypted document", ex);&lt;BR /&gt;}&lt;/P&gt; 
&lt;P&gt;OPCPackage dataStream = OPCPackage.open (d.getDataStream(fileSystem)) ;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Getting error :&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;The supplied data appears to be in the Office 2007+ XML. You are calling the part of POI that deals with OLE2 Office Documents. You need to call a different part of POI to process this data (eg XSSF instead of HSSF)&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;The same code works fine in Eclipse, But Not woking in Talend.&lt;/P&gt; 
&lt;P&gt;I have used below Jars in Eclipse and Talend&lt;/P&gt; 
&lt;P&gt;commons-collections4-4.1&lt;/P&gt; 
&lt;P&gt;poi-3.17&lt;/P&gt; 
&lt;P&gt;poi-ooxml-3.17&lt;/P&gt; 
&lt;P&gt;poi-ooxml-schemas-3.17&lt;/P&gt; 
&lt;P&gt;xerces-2.9.0&lt;/P&gt; 
&lt;P&gt;xmlbeans-2.6.0&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Please suggest if any Jar should be updated / added for the code to work in Talend&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;// The package open is instantaneous, as it should be.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 08:21:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Talend-Routine-Not-working-for-POIFileSystem/m-p/2295351#M68135</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T08:21:04Z</dc:date>
    </item>
    <item>
      <title>Re: Talend Routine Not working for POIFileSystem</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Talend-Routine-Not-working-for-POIFileSystem/m-p/2295352#M68136</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;So far, talend don't handle passwords in the Excel components, so it's impossible to read a file protected which can only be accessed with a password.&lt;/P&gt;
&lt;P&gt;We suppose that the Apache POI library supports the password encryption in various manner.&lt;/P&gt;
&lt;P&gt;Here is a custom component tFileExcelWorkbookOpen written by talend community user and shared on talend exchange portal. It can support for password protected files.&lt;/P&gt;
&lt;P&gt;Hope it will shed some light for you.&lt;/P&gt;
&lt;P&gt;Best regards&lt;/P&gt;
&lt;P&gt;Sabrina&lt;/P&gt;</description>
      <pubDate>Thu, 26 Apr 2018 08:08:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Talend-Routine-Not-working-for-POIFileSystem/m-p/2295352#M68136</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-04-26T08:08:39Z</dc:date>
    </item>
  </channel>
</rss>

