<?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 Excel datasource with &amp;quot;outline&amp;quot; structure / staggered rows for fields in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Excel-datasource-with-quot-outline-quot-structure-staggered-rows/m-p/242674#M709688</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 a simple way of writing the script so that it deals with Excel datasources in "outline" structure (with staggered rows for different levels of grouping)?&amp;nbsp; I've attached an example Excel file to show you what I mean - it's the standard download format from FactSet, and I have lots of files like this that I'd love to put into QlikView.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to preserve the different grouping levels that come from FactSet, so don't want to just exclude the "total" rows (e.g. rows 10, 11, 12, 13 and 14 in the attached file) unless I can somehow read in the group name (which only appears at the "total" row at the top of each group and sub-group of rows) for each row.&amp;nbsp; For example, from the row of data in row 58 of the attached file, I want QV to read in the following fields and field values:&lt;/P&gt;&lt;P&gt;- Date = 30-Sep-10&lt;/P&gt;&lt;P&gt;- Asset class = Equity&lt;/P&gt;&lt;P&gt;- Region = Western Europe&lt;/P&gt;&lt;P&gt;- Country = United Kingdom&lt;/P&gt;&lt;P&gt;- Sector = Consumer Staples&lt;/P&gt;&lt;P&gt;- Industry = Tobacco&lt;/P&gt;&lt;P&gt;- Security name = British American Tobacco PLC&lt;/P&gt;&lt;P&gt;as well as the data points in cells M58:V58 (with column headings at the top which I would manually rename as they are split over different rows).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would then probably try to put some fields into drill-down groupings within QlikView (e.g. Region as a parent of Country, and Sector as a parent of Industry) - this should be OK, it's just reading in the field values correctly for each row that I can't figure out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this makes sense - I think it's quite self-explanatory once you look at the Excel file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would be brilliant if somebody could get back to me within a day or so - thank you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sarah&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 02 Aug 2011 11:26:35 GMT</pubDate>
    <dc:creator>sarahallen1</dc:creator>
    <dc:date>2011-08-02T11:26:35Z</dc:date>
    <item>
      <title>Excel datasource with "outline" structure / staggered rows for fields</title>
      <link>https://community.qlik.com/t5/QlikView/Excel-datasource-with-quot-outline-quot-structure-staggered-rows/m-p/242674#M709688</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 a simple way of writing the script so that it deals with Excel datasources in "outline" structure (with staggered rows for different levels of grouping)?&amp;nbsp; I've attached an example Excel file to show you what I mean - it's the standard download format from FactSet, and I have lots of files like this that I'd love to put into QlikView.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to preserve the different grouping levels that come from FactSet, so don't want to just exclude the "total" rows (e.g. rows 10, 11, 12, 13 and 14 in the attached file) unless I can somehow read in the group name (which only appears at the "total" row at the top of each group and sub-group of rows) for each row.&amp;nbsp; For example, from the row of data in row 58 of the attached file, I want QV to read in the following fields and field values:&lt;/P&gt;&lt;P&gt;- Date = 30-Sep-10&lt;/P&gt;&lt;P&gt;- Asset class = Equity&lt;/P&gt;&lt;P&gt;- Region = Western Europe&lt;/P&gt;&lt;P&gt;- Country = United Kingdom&lt;/P&gt;&lt;P&gt;- Sector = Consumer Staples&lt;/P&gt;&lt;P&gt;- Industry = Tobacco&lt;/P&gt;&lt;P&gt;- Security name = British American Tobacco PLC&lt;/P&gt;&lt;P&gt;as well as the data points in cells M58:V58 (with column headings at the top which I would manually rename as they are split over different rows).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would then probably try to put some fields into drill-down groupings within QlikView (e.g. Region as a parent of Country, and Sector as a parent of Industry) - this should be OK, it's just reading in the field values correctly for each row that I can't figure out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this makes sense - I think it's quite self-explanatory once you look at the Excel file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would be brilliant if somebody could get back to me within a day or so - thank you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sarah&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Aug 2011 11:26:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Excel-datasource-with-quot-outline-quot-structure-staggered-rows/m-p/242674#M709688</guid>
      <dc:creator>sarahallen1</dc:creator>
      <dc:date>2011-08-02T11:26:35Z</dc:date>
    </item>
    <item>
      <title>Re: Excel datasource with "outline" structure / staggered rows for fields</title>
      <link>https://community.qlik.com/t5/QlikView/Excel-datasource-with-quot-outline-quot-structure-staggered-rows/m-p/242675#M709689</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; hei &lt;/P&gt;&lt;P&gt;attach is a start&lt;/P&gt;&lt;P&gt;it fills all the blanks&lt;/P&gt;&lt;P&gt;and saves only lowest hirarchey row&lt;/P&gt;&lt;P&gt;in this row you have all the information in one row&lt;/P&gt;&lt;P&gt;now all you need is rename the fields&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Aug 2011 11:45:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Excel-datasource-with-quot-outline-quot-structure-staggered-rows/m-p/242675#M709689</guid>
      <dc:creator>lironbaram</dc:creator>
      <dc:date>2011-08-02T11:45:13Z</dc:date>
    </item>
    <item>
      <title>Re: Excel datasource with "outline" structure / staggered rows for fields</title>
      <link>https://community.qlik.com/t5/QlikView/Excel-datasource-with-quot-outline-quot-structure-staggered-rows/m-p/242676#M709690</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Liron,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks very much for your reply.&amp;nbsp; It's certainly a start, and much better than I was managing (so thanks!), but it still doesn't quite read in the data right.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've attached your document with the columns renamed (for clarity) and I've added a pivot table (as this best reflects how the data was in the source file).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Take Fresnillo PLC, for example.&amp;nbsp; Once I've pivoted the date field to go horizontally along the top, there should only be one row for Fresnillo (as this stock name is the lowest heirarchy) - with multiple columns for "ending weight", "market cap", "# of securities" and "date".&amp;nbsp; However, as the attached document shows, Fresillo appears in 6 rows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- North America / Mexico / Materials / Metals &amp;amp; Mining&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (this is the correct classification)&lt;/P&gt;&lt;P&gt;- Western Europe / Mexico / Materials / Metals &amp;amp; Mining&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;- Western Europe / Spain / Industrials / Airlines&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;- Western Europe / Spain / Industrials / Metals &amp;amp; Mining&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;- Western Europe / Spain / Materials / Metals &amp;amp; Mining&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It looks like it's reading in some rows below/above the correct row for Fresnillo (and indeed for other stocks).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you say, it only needs to read from the rows where Stock_Name&amp;lt;&amp;gt;' '.&amp;nbsp; It then needs to pick up the other field values from the first non-empty cells moving left and up.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help so far - would be great if you could suggest a solution to the above problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Sarah&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Aug 2011 13:24:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Excel-datasource-with-quot-outline-quot-structure-staggered-rows/m-p/242676#M709690</guid>
      <dc:creator>sarahallen1</dc:creator>
      <dc:date>2011-08-02T13:24:29Z</dc:date>
    </item>
    <item>
      <title>Excel datasource with "outline" structure / staggered rows for fields</title>
      <link>https://community.qlik.com/t5/QlikView/Excel-datasource-with-quot-outline-quot-structure-staggered-rows/m-p/242677#M709691</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; hei saraha&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;yes there is a mistake in the code&lt;/P&gt;&lt;P&gt;from the filters you need to delete&lt;/P&gt;&lt;P&gt;the line&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Replace &lt;SPAN style="font-size: 8pt;"&gt;(7, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;top&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;StrCnd&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;null&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)), &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Aug 2011 13:36:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Excel-datasource-with-quot-outline-quot-structure-staggered-rows/m-p/242677#M709691</guid>
      <dc:creator>lironbaram</dc:creator>
      <dc:date>2011-08-02T13:36:08Z</dc:date>
    </item>
    <item>
      <title>Re: Excel datasource with "outline" structure / staggered rows for fields</title>
      <link>https://community.qlik.com/t5/QlikView/Excel-datasource-with-quot-outline-quot-structure-staggered-rows/m-p/242678#M709692</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hei,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That looks great - thank you very much!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sarah&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Aug 2011 13:39:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Excel-datasource-with-quot-outline-quot-structure-staggered-rows/m-p/242678#M709692</guid>
      <dc:creator>sarahallen1</dc:creator>
      <dc:date>2011-08-02T13:39:37Z</dc:date>
    </item>
  </channel>
</rss>

