6

I have an Azure Logic app which picks a file from the Sharepoint site. In the next step, I want to parse the file contents to read them line-by-line and to pass each line in an Azure function I have already created.

At this stage I am unable to fetch and loop through each line of the file. I can get the complete file only.

Any suggestion on how to achieve this?

Nirman
  • 6,715
  • 19
  • 72
  • 139
  • 1
    It will be good to understand what operation are you trying to perform on each line? As of now there is no out-of box connector or function in LogicApp which parses a CSV file line by line. You can always vote for new features https://feedback.azure.com/forums/287593-logic-apps?query=CSV You will have to pass the whole content to the Azure Function that you already have and perform the necessary operation on it.. – TusharJ Sep 30 '16 at 17:42
  • please post this as an answer and I shall mark it. thank you. – Nirman Oct 14 '16 at 09:50
  • @Nirman, how did you pass file from azure logic apps and get it in azure function. a example will be very helpful. – Ravi Anand Dec 13 '16 at 14:14

2 Answers2

7

As of now there is no out-of box connector or function in LogicApp which parses a CSV file line by line. You can always vote for new features feedback.azure.com/forums/287593-logic-apps?query=CSV

  1. You will have to pass the whole content to the Azure Function that you already have and perform the necessary operation on it

    Or

  2. There is a CSVToJson connector available in LogicApps github repo to use

https://github.com/logicappsio/CSVtoJSON

Not officially supported but should be able to use it.

Community
  • 1
  • 1
TusharJ
  • 1,213
  • 2
  • 11
  • 18
2

Currently, there is a feature is Azure Logic App which can read Excel file from the given location.

Take a look at this blog - https://www.pmichaels.net/2018/04/22/what-can-you-do-with-a-logic-app-part-two-use-excel-to-manage-an-e-mail-notification-system/, it's written pretty well and should give you a heads-up about using the feature.

Pang
  • 9,564
  • 146
  • 81
  • 122
Pratik Bhattacharya
  • 3,596
  • 2
  • 32
  • 60
  • 1
    Thanks for Pratik with the updates. Yes, I agree this should be the solution going forward... unlike 2016 when we had limited options. Thanks :) – Nirman Aug 06 '18 at 11:26