<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Optimize Excel Tools Reading</title><link>https://community.appian.com/discussions/f/general/22675/optimize-excel-tools-reading</link><description>Hello, is there a way to optimize the reading of excel file with Excel Tools Plug-in. In general the reading time it takes to long, for example to read 70 cells it takes about 5 minutes, for something like that : 
 
 Any suggestions are welcome ! 
 Thanks</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Optimize Excel Tools Reading</title><link>https://community.appian.com/thread/88683?ContentTypeID=1</link><pubDate>Fri, 03 Dec 2021 19:48:54 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:3bb30c83-6772-4ccd-9060-10c74126a303</guid><dc:creator>Vladimir Vasilev</dc:creator><description>&lt;p&gt;&lt;a title="Exampled Excel" href="https://www.bakertilly-digital.com/ExampleExcel.zip"&gt;https://www.bakertilly-digital.com/ExampleExcel.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Can be downloaded here, example in the first sheet M and N columns are only information of value for extraction.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Optimize Excel Tools Reading</title><link>https://community.appian.com/thread/88682?ContentTypeID=1</link><pubDate>Fri, 03 Dec 2021 19:41:23 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:e520a1fa-4215-4ccf-9162-47eabc30dd2b</guid><dc:creator>Chris</dc:creator><description>&lt;p&gt;It would be tough to troubleshoot without some additional samples.&amp;nbsp; Are you able to include a scrubbed version of the Excel file here, etc?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Optimize Excel Tools Reading</title><link>https://community.appian.com/thread/88681?ContentTypeID=1</link><pubDate>Fri, 03 Dec 2021 19:28:30 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:228d269d-e980-482e-b3b3-d381d1a5c699</guid><dc:creator>Vladimir Vasilev</dc:creator><description>&lt;p&gt;I have tried this solution but the problem is that&amp;nbsp;this is complex excel file, with this function what happens is that it does not return data or returns only one small part of the data.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Optimize Excel Tools Reading</title><link>https://community.appian.com/thread/88680?ContentTypeID=1</link><pubDate>Fri, 03 Dec 2021 19:04:56 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:c3e8c903-f927-411a-9f4b-8115d2f6c1c3</guid><dc:creator>Chris</dc:creator><description>&lt;p&gt;To add, here&amp;#39;s some sample code from one of my excel reading functions which converts the document to a CDT.&amp;nbsp; Note this is on an older version of Excel Tools which utilizes &lt;strong&gt;fn!readexcelsheet()&lt;/strong&gt;, the newer version to use is &lt;strong&gt;fn!readexcelsheet&lt;span style="background-color:#ffff00;"&gt;paging&lt;/span&gt;().&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="csharp"&gt;a!localVariables(
  local!data: readexcelsheet(
    ri!doc,
    0,
    2
  ),

  if(
    not(local!data.success),
    {},
    reject(
      rule!APN_isEmpty,
      a!flatten(
        a!forEach(
          items: local!data.result,
          expression: {
            /* fv!index will tell you which row is currently being referenced */
            if(
              rule!APN_isEmpty(index(fv!item.values,1,&amp;quot;&amp;quot;)),
              null,
              &amp;#39;type!{urn:com:gdit:types}Your_Data_Type&amp;#39;(
                field1: index(fv!item.values,1,&amp;quot;&amp;quot;),
                field2: index(fv!item.values,2,&amp;quot;&amp;quot;),
                field3: index(fv!item.values,3,&amp;quot;&amp;quot;),
                field4: index(fv!item.values,4,&amp;quot;&amp;quot;)
              )
            )
          }
        )
      )
    )
  )
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Optimize Excel Tools Reading</title><link>https://community.appian.com/thread/88679?ContentTypeID=1</link><pubDate>Fri, 03 Dec 2021 18:44:37 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:bb922079-4b52-4141-810e-6c86a051fa90</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;Exactly as Chris mentioned already, it would be far more efficient to read the entire sheet data into a local variable and then step through that to parse it, rather than reading one cell at a time over dozens of cells.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Even your current call seems like it could be far more efficient by passing in arrays of column and row numbers (considering that you&amp;#39;re reading the same columns across all rows), however it&amp;#39;d probably be easier just to read the entire sheet to local data and parse that as needed.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Optimize Excel Tools Reading</title><link>https://community.appian.com/thread/88678?ContentTypeID=1</link><pubDate>Fri, 03 Dec 2021 18:22:57 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:5032d31f-bbc4-42e6-9e40-f3c51644f51f</guid><dc:creator>Chris</dc:creator><description>&lt;p&gt;Agree with Mike - you should be able to use&amp;nbsp;&lt;span&gt;fn!readexcelsheetpaging(), which will map your entire excel file to a CDT.&amp;nbsp; From there, all your data points will be in the same order - instead of reading say row 39 column 4 individually, the same value will be in your local CDT at row 39, 4th data point..&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Optimize Excel Tools Reading</title><link>https://community.appian.com/thread/88677?ContentTypeID=1</link><pubDate>Fri, 03 Dec 2021 18:10:02 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:99ffd0ad-f36e-4504-8573-7de04cdddcad</guid><dc:creator>Vladimir Vasilev</dc:creator><description>&lt;p&gt;&lt;a href="/members/mikes0011"&gt;Mike Schmitt&lt;/a&gt;&amp;nbsp; Well, this is the way I know how to read specific cells from excel file. Is there a better way ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Optimize Excel Tools Reading</title><link>https://community.appian.com/thread/88658?ContentTypeID=1</link><pubDate>Fri, 03 Dec 2021 14:46:25 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:1a2cd96e-06dc-43bb-9c43-a082074ada21</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;Is there any particular reason you&amp;#39;re not using &lt;strong&gt;&lt;em&gt;readExcelSheet()&lt;/em&gt;&lt;/strong&gt;&lt;em&gt;&lt;/em&gt;?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Optimize Excel Tools Reading</title><link>https://community.appian.com/thread/88657?ContentTypeID=1</link><pubDate>Fri, 03 Dec 2021 14:33:00 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:19f8a949-dfea-47e0-b81b-ae1653c078ae</guid><dc:creator>Stewart Burchell</dc:creator><description>&lt;p&gt;A possible totally different approach might be to load the Excel file directly to a &amp;quot;staging&amp;quot; table in the database and then use either an Appian query (entity or record) or a call to a Stored Procedure to retrieve the data and process that way...loading to the table is in my experience pretty quick, as is fetching data by either of the methods I&amp;#39;ve described.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>