<?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 Java code to disable Excel Protected file in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Java-code-to-disable-Excel-Protected-file/m-p/2361014#M125471</link>
    <description>&lt;P&gt;We have an Excel email attachment which is in the protective mode and would like to disable it.&lt;/P&gt;&lt;P&gt;We only want to disable only this one particular report file and not others.&lt;/P&gt;&lt;P&gt;After google research found following code to implement in tJava but not working.&lt;/P&gt;&lt;P&gt;What do I need to import under the Advanced settings in order for this to work?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Open the Excel file&lt;/P&gt;&lt;P&gt;Workbook workbook = new Workbook("C:/Temp/TestReport.xlsx");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Unprotect workbook&lt;/P&gt;&lt;P&gt;workbook.unprotect("12345");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Set password to null&lt;/P&gt;&lt;P&gt;workbook.getSettings().setPassword(null);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Save the file&lt;/P&gt;&lt;P&gt;workbook.save("C:/Temp/Attachment/UnProtectTestReport.xlsx");&lt;/P&gt;</description>
    <pubDate>Fri, 15 Nov 2024 21:21:44 GMT</pubDate>
    <dc:creator>rp2018</dc:creator>
    <dc:date>2024-11-15T21:21:44Z</dc:date>
    <item>
      <title>Java code to disable Excel Protected file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Java-code-to-disable-Excel-Protected-file/m-p/2361014#M125471</link>
      <description>&lt;P&gt;We have an Excel email attachment which is in the protective mode and would like to disable it.&lt;/P&gt;&lt;P&gt;We only want to disable only this one particular report file and not others.&lt;/P&gt;&lt;P&gt;After google research found following code to implement in tJava but not working.&lt;/P&gt;&lt;P&gt;What do I need to import under the Advanced settings in order for this to work?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Open the Excel file&lt;/P&gt;&lt;P&gt;Workbook workbook = new Workbook("C:/Temp/TestReport.xlsx");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Unprotect workbook&lt;/P&gt;&lt;P&gt;workbook.unprotect("12345");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Set password to null&lt;/P&gt;&lt;P&gt;workbook.getSettings().setPassword(null);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Save the file&lt;/P&gt;&lt;P&gt;workbook.save("C:/Temp/Attachment/UnProtectTestReport.xlsx");&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2024 21:21:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Java-code-to-disable-Excel-Protected-file/m-p/2361014#M125471</guid>
      <dc:creator>rp2018</dc:creator>
      <dc:date>2024-11-15T21:21:44Z</dc:date>
    </item>
  </channel>
</rss>

