Question
Export Data method - MS Excel component
How to pass the Cell start and cell end params when am not sure about the number of rows and number of columns in the excel sheet? Because this is mandatory for exporting the data of the excel sheet into a lookup table. How to process the data if we do not know the cell start and cell end param values?
Also, unable to pass the result of an ExportData method to an exit shape with DataTable parameter. What am i missing here?
**Moderation Team has archived post**
How to pass the Cell start and cell end params when am not sure about the number of rows and number of columns in the excel sheet? Because this is mandatory for exporting the data of the excel sheet into a lookup table. How to process the data if we do not know the cell start and cell end param values?
Also, unable to pass the result of an ExportData method to an exit shape with DataTable parameter. What am i missing here?
**Moderation Team has archived post**
This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.
Excel does provide a used range that would get you at least farther than the end, however if you need the exact end, you need to loop through all rows. The Excel used range basically gets you the last cell that ever had something in it, so it might be way past the actual end. I have attached a screenshot of that automation though.
When I have done this in the past with a large number of rows, I create a series of nested loops to go through ever smaller increments. For 30k, I would create one loop that increments the row by 1000. When I get to one that is blank, I would go to another loop that starts 1000 less (or goes backwards, although backwards with the ForLoop component is tricky) and iterates by 100. When that reaches a blank row, then start 100 less and iterate by 1 as going through 99 rows won't take much time. This would mean that for 30,201 rows, you would have to check essentially five cells before you found the correct one.