<?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 Reading pasword protected excel file in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Reading-pasword-protected-excel-file/m-p/1077215#M359287</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have a requirement to read password protected excel file whose password will be same always.&lt;/P&gt;&lt;P&gt;I had gone through the various post on qlikview community for thi and solcution is provided is that to create ODBC connection and read the file and that excel file is opned on the server.But when it is password protected file means that file is having sensitive data so its not supposed to be opened.So i want a solution to read the file and password we wil put in qlikview backend.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 09 Feb 2016 05:46:32 GMT</pubDate>
    <dc:creator />
    <dc:date>2016-02-09T05:46:32Z</dc:date>
    <item>
      <title>Reading pasword protected excel file</title>
      <link>https://community.qlik.com/t5/QlikView/Reading-pasword-protected-excel-file/m-p/1077215#M359287</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have a requirement to read password protected excel file whose password will be same always.&lt;/P&gt;&lt;P&gt;I had gone through the various post on qlikview community for thi and solcution is provided is that to create ODBC connection and read the file and that excel file is opned on the server.But when it is password protected file means that file is having sensitive data so its not supposed to be opened.So i want a solution to read the file and password we wil put in qlikview backend.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Feb 2016 05:46:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Reading-pasword-protected-excel-file/m-p/1077215#M359287</guid>
      <dc:creator />
      <dc:date>2016-02-09T05:46:32Z</dc:date>
    </item>
    <item>
      <title>Re: Reading pasword protected excel file</title>
      <link>https://community.qlik.com/t5/QlikView/Reading-pasword-protected-excel-file/m-p/1077216#M359288</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please suggest something&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Feb 2016 06:19:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Reading-pasword-protected-excel-file/m-p/1077216#M359288</guid>
      <dc:creator />
      <dc:date>2016-02-10T06:19:13Z</dc:date>
    </item>
    <item>
      <title>Re: Reading pasword protected excel file</title>
      <link>https://community.qlik.com/t5/QlikView/Reading-pasword-protected-excel-file/m-p/1077217#M359289</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check this,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/thread/46567"&gt;How to open Password protected Excel file in qlikview?&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Feb 2016 11:09:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Reading-pasword-protected-excel-file/m-p/1077217#M359289</guid>
      <dc:creator>HirisH_V7</dc:creator>
      <dc:date>2016-02-10T11:09:16Z</dc:date>
    </item>
    <item>
      <title>Re: Reading pasword protected excel file</title>
      <link>https://community.qlik.com/t5/QlikView/Reading-pasword-protected-excel-file/m-p/1077218#M359290</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/thread/13917"&gt;load a Password protected Excel File to QlikView&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Feb 2016 11:14:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Reading-pasword-protected-excel-file/m-p/1077218#M359290</guid>
      <dc:creator>sujeetsingh</dc:creator>
      <dc:date>2016-02-10T11:14:37Z</dc:date>
    </item>
    <item>
      <title>Re: Reading pasword protected excel file</title>
      <link>https://community.qlik.com/t5/QlikView/Reading-pasword-protected-excel-file/m-p/1077219#M359291</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you check this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A __default_attr="3129" __jive_macro_name="idea" class="jive_macro jive_macro_idea" data-orig-content="Read password protected excel" href="https://community.qlik.com/"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/thread/13917"&gt;load a Password protected Excel File to QlikView&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A __default_attr="46567" __jive_macro_name="thread" class="jive_macro jive_macro_thread" href="https://community.qlik.com/"&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Feb 2016 11:15:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Reading-pasword-protected-excel-file/m-p/1077219#M359291</guid>
      <dc:creator>avinashelite</dc:creator>
      <dc:date>2016-02-10T11:15:15Z</dc:date>
    </item>
    <item>
      <title>Re: Reading pasword protected excel file</title>
      <link>https://community.qlik.com/t5/QlikView/Reading-pasword-protected-excel-file/m-p/1077220#M359292</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have gone thorugh all the links related with the above topic.But i want a way to read a file without opening an excel file in server&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Feb 2016 06:48:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Reading-pasword-protected-excel-file/m-p/1077220#M359292</guid>
      <dc:creator />
      <dc:date>2016-02-15T06:48:01Z</dc:date>
    </item>
    <item>
      <title>Re: Reading pasword protected excel file</title>
      <link>https://community.qlik.com/t5/QlikView/Reading-pasword-protected-excel-file/m-p/1077221#M359293</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any data base for that Server Means you can export it as a excel .By running excel export services .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Whats your database? i think it may be SQL means,&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_1455557610326797" jivemacro_uid="_1455557610326797" modifiedtitle="true"&gt;
&lt;P&gt;1 Export data to existing EXCEL file from SQL Server table&lt;/P&gt;
&lt;P&gt;insert into OPENROWSET('Microsoft.Jet.OLEDB.4.0', &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Excel 8.0;Database=D:\testing.xls;', &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'SELECT * FROM [SheetName$]') select * from SQLServerTable&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;2 Export data from Excel to new SQL Server table&lt;/P&gt;
&lt;P&gt;select * &lt;/P&gt;
&lt;P&gt;into SQLServerTable FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0', &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Excel 8.0;Database=D:\testing.xls;HDR=YES', &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'SELECT * FROM [Sheet1$]')&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;3 Export data from Excel to existing SQL Server table&lt;/P&gt;
&lt;P&gt;Insert into SQLServerTable Select * FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0', &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Excel 8.0;Database=D:\testing.xls;HDR=YES', &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'SELECT * FROM [SheetName$]')&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;4 If you dont want to create an EXCEL file in advance and want to export data to it, use&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;EXEC sp_makewebtask &lt;/P&gt;
&lt;P&gt;&amp;nbsp; @outputfile = 'd:\testing.xls', &lt;/P&gt;
&lt;P&gt;&amp;nbsp; @query = 'Select * from Database_name..SQLServerTable', &lt;/P&gt;
&lt;P&gt;&amp;nbsp; @colheaders =1, &lt;/P&gt;
&lt;P&gt;&amp;nbsp; @FixedFont=0,@lastupdated=0,@resultstitle='Testing details'&lt;/P&gt;
&lt;P&gt;(Now you can find the file with data in tabular format)&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;5 To export data to new EXCEL file with heading(column names), create the following procedure&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;create procedure proc_generate_excel_with_columns&lt;/P&gt;
&lt;P&gt;(&lt;/P&gt;
&lt;P&gt;&amp;nbsp; @db_name varchar(100),&lt;/P&gt;
&lt;P&gt;&amp;nbsp; @table_name varchar(100),&lt;/P&gt;
&lt;P&gt;&amp;nbsp; @file_name varchar(100)&lt;/P&gt;
&lt;P&gt;)&lt;/P&gt;
&lt;P&gt;as&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;--Generate column names as a recordset&lt;/P&gt;
&lt;P&gt;declare @columns varchar(8000), @sql varchar(8000), @data_file varchar(100)&lt;/P&gt;
&lt;P&gt;select &lt;/P&gt;
&lt;P&gt;&amp;nbsp; @columns=coalesce(@columns+',','')+column_name+' as '+column_name &lt;/P&gt;
&lt;P&gt;from &lt;/P&gt;
&lt;P&gt;&amp;nbsp; information_schema.columns&lt;/P&gt;
&lt;P&gt;where &lt;/P&gt;
&lt;P&gt;&amp;nbsp; table_name=@table_name&lt;/P&gt;
&lt;P&gt;select @columns=''''''+replace(replace(@columns,' as ',''''' as '),',',',''''')&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;--Create a dummy file to have actual data&lt;/P&gt;
&lt;P&gt;select @data_file=substring(@file_name,1,len(@file_name)-charindex('\',reverse(@file_name)))+'\data_file.xls'&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;--Generate column names in the passed EXCEL file&lt;/P&gt;
&lt;P&gt;set @sql='exec master..xp_cmdshell ''bcp " select * from (select '+@columns+') as t" queryout "'+@file_name+'" -c'''&lt;/P&gt;
&lt;P&gt;exec(@sql)&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;--Generate data in the dummy file&lt;/P&gt;
&lt;P&gt;set @sql='exec master..xp_cmdshell ''bcp "select * from '+@db_name+'..'+@table_name+'" queryout "'+@data_file+'" -c'''&lt;/P&gt;
&lt;P&gt;exec(@sql)&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;--Copy dummy file to passed EXCEL file&lt;/P&gt;
&lt;P&gt;set @sql= 'exec master..xp_cmdshell ''type '+@data_file+' &amp;gt;&amp;gt; "'+@file_name+'"'''&lt;/P&gt;
&lt;P&gt;exec(@sql)&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;--Delete dummy file &lt;/P&gt;
&lt;P&gt;set @sql= 'exec master..xp_cmdshell ''del '+@data_file+''''&lt;/P&gt;
&lt;P&gt;exec(@sql)&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;After creating the procedure, execute it by supplying database name, table name and file path&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;EXEC proc_generate_excel_with_columns 'your dbname', 'your table name','your file path'&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please check,&lt;/P&gt;&lt;P&gt;HTH,&lt;/P&gt;&lt;P&gt;Hirish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Feb 2016 17:33:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Reading-pasword-protected-excel-file/m-p/1077221#M359293</guid>
      <dc:creator>HirisH_V7</dc:creator>
      <dc:date>2016-02-15T17:33:51Z</dc:date>
    </item>
  </channel>
</rss>

