<?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 OLEDB SQL query Help-Dynamic Worksheet name in Product Forum</title>
    <link>https://community.blueprism.com/t5/Product-Forum/OLEDB-SQL-query-Help-Dynamic-Worksheet-name/m-p/73758#M26363</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I'm trying to get the data using the query from the OLEDB&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"select * from [Sheet1$]"&lt;/P&gt;
&lt;P&gt;but I have the worksheet Name as Dynamic as it changes everyday. This is my worksheet name Prepaid 9220 and it's changes everyday&lt;/P&gt;
&lt;P&gt;Could you please help with the SQl query to get the data with the Dynamic worksheet ?&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;SYED FAHEEM&lt;BR /&gt;RPA Developer&lt;BR /&gt;DAR-ME&lt;BR /&gt;Asia/Kolkata&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
    <pubDate>Thu, 30 Mar 2023 07:59:00 GMT</pubDate>
    <dc:creator>faheemsd</dc:creator>
    <dc:date>2023-03-30T07:59:00Z</dc:date>
    <item>
      <title>OLEDB SQL query Help-Dynamic Worksheet name</title>
      <link>https://community.blueprism.com/t5/Product-Forum/OLEDB-SQL-query-Help-Dynamic-Worksheet-name/m-p/73758#M26363</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I'm trying to get the data using the query from the OLEDB&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"select * from [Sheet1$]"&lt;/P&gt;
&lt;P&gt;but I have the worksheet Name as Dynamic as it changes everyday. This is my worksheet name Prepaid 9220 and it's changes everyday&lt;/P&gt;
&lt;P&gt;Could you please help with the SQl query to get the data with the Dynamic worksheet ?&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;SYED FAHEEM&lt;BR /&gt;RPA Developer&lt;BR /&gt;DAR-ME&lt;BR /&gt;Asia/Kolkata&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Thu, 30 Mar 2023 07:59:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/OLEDB-SQL-query-Help-Dynamic-Worksheet-name/m-p/73758#M26363</guid>
      <dc:creator>faheemsd</dc:creator>
      <dc:date>2023-03-30T07:59:00Z</dc:date>
    </item>
    <item>
      <title>RE: OLEDB SQL query Help-Dynamic Worksheet name</title>
      <link>https://community.blueprism.com/t5/Product-Forum/OLEDB-SQL-query-Help-Dynamic-Worksheet-name/m-p/73759#M26364</link>
      <description>&lt;P&gt;If there is a logic behind the worksheet name, store the query in a text Data Item and the Worksheet name on another Data Item. Add some logic to set the name of the worksheet via a calculation stage. Add another calculation stage after that to amend the OLEDB query accordingly.&lt;/P&gt;
&lt;P&gt;Another option would be to open the excel file and use the Action 'Get Worksheet Name' , assuming the target worksheet is always placed on the same position. Store the output of said action on a Data Item (e.g. 's_WorksheetName') and then close both workbook and excel instance (technically you only need to close the WB, but just to be on the safe side).&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="15234.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/15397iE715212232261080/image-size/large?v=v2&amp;amp;px=999" role="button" title="15234.png" alt="15234.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Then, build the query via calculation stage like this "SELECT * FROM ["&amp;amp; [s_WorksheetName] &amp;amp;"$]"&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Ramón Requena López&lt;BR /&gt;RPA Developer&lt;BR /&gt;Magenta Telekom&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Thu, 30 Mar 2023 12:55:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/OLEDB-SQL-query-Help-Dynamic-Worksheet-name/m-p/73759#M26364</guid>
      <dc:creator>RamónRequena_L1</dc:creator>
      <dc:date>2023-03-30T12:55:00Z</dc:date>
    </item>
    <item>
      <title>RE: OLEDB SQL query Help-Dynamic Worksheet name</title>
      <link>https://community.blueprism.com/t5/Product-Forum/OLEDB-SQL-query-Help-Dynamic-Worksheet-name/m-p/73760#M26365</link>
      <description>&lt;P&gt;Hi Ramón Requena López,&lt;/P&gt;
&lt;P&gt;Thanks for your response.&lt;/P&gt;
&lt;P&gt;I have applied the above mentioned 2nd method and it's working fine for me.&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;SYED FAHEEM&lt;BR /&gt;RPA Developer&lt;BR /&gt;DAR-ME&lt;BR /&gt;Asia/Kolkata&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Thu, 30 Mar 2023 13:02:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/OLEDB-SQL-query-Help-Dynamic-Worksheet-name/m-p/73760#M26365</guid>
      <dc:creator>faheemsd</dc:creator>
      <dc:date>2023-03-30T13:02:00Z</dc:date>
    </item>
  </channel>
</rss>

