0

I need to create an excel document daily that captures any changes to a SharePoint list.

The list on SharePoint contains the columns 'vendor' / 'product' / 'promotion' and is sorted by vendor first, and product second.

Using the 'Get Items' SharePoint connector to feed 'Insert Rows' Excel connector is yielding the correct result, except that it is not putting the items in the order they are displayed on the SP list (sorted by vendor, then product). It is adding them to excel in the order they were added to the sharepoint list (I. E. The last addition to the sharepoint list is last on the excel table).

I am using insert row instead of create table or create worksheet because the formating of the cells must be maintained. By leaving the first cell in my template intact and deleting all of the old entries before getting the updated ones, the formatting is preserved.

There are actions updstream and downstream within my flow that I would like to preserve, so using an alternative solution to Flow is not ideal.

Is there a way to bring the sharepoint row items in order?

6
  • 1
    Have you considered using Power Query (Get & Transform) in Excel to pull the data from SharePoint? You can sort any which way in the query editor and then load the data into an Excel sheet or the Excel data model for further processing. Commented May 22, 2018 at 6:21
  • Thank you for the tip. Are you able to pull sharepoint list items directly with power query on excel? This must be automated and the excel file hosted on OneDrive. Ideally this all happens in Flow, as there are actions before and after (converting, emailing, etc). Do you think this is possible? Commented May 22, 2018 at 6:43
  • With Power Query you will need to open the Excel workbook and refresh the query. I don't understand why you need to bring the data into Excel if you don't want to open Excel. Why can't you use the SharePoint data? Please edit your question and describer the business process that you need to solve. Don't focus on any specific app. Just describe what you want to achieve. Why can't you use the SharePoint data directly in Flow? Why extract to Excel first? That does not make sense. Commented May 22, 2018 at 10:14
  • That's a fair question. The flow ends in a print ready PDF being served up on the company's intranet. I assumed "print list" would be an option in sharepoint, but it is not. This must be user friendly and completely dummy proof for the end users (aka, just press print). Commented May 22, 2018 at 11:07
  • Please edit your question to provide more detail. Don't do that in comments. Add a comment when you have edited your question so the followers of your question will get notified. Commented May 22, 2018 at 11:15

1 Answer 1

0

There was two factors mitigating the results of my flow:

1) There seems to be some bug that if you do not "Filter By" the items, applying an "Order By" paramater wraps the action in an apply to each, which is unworkable.

2) Looking at the server responses from the Flow report, I noticed that the Display names of some of the columns in my SharepPoint List were not the same as my column header. In my case, I renamed "Title" to "Partner", but it was still being identified as "Title", despite not displaying this in Sharepoint.

Overall solution was to 1) put a dummy filter in that grabbed everything in the Get Items action: "Title ne 'x'" (remove " marks when using in Filter By, means Title not equal 'x'), and 2)Using "Title asc" in Order By.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.