cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper IV
Helper IV

When I create a new file, I do not get the correct result as in the Excel file?

reply.PNG

replt1 (1).PNG

 

I need to get all the results from the Excel file. I only get the result of the second row. If I delete the second row then I get the results of the first row, but I need all the results and I also need the column names of the values, like the Excel table. 

- I only selected 'id' and 'id2'.

 

I hope someone can help me out.

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Super User II
Super User II

Re: When I create a new file, I do not get the correct result as in the Excel file?

Hey @ahmadbutt 

If I've understood your requirement correctly... you need to get each row from the spreadsheet and add this data to a newly created txt file? If so this Flow should work for you:

1. Get all the rows from the Excel sheet

2. Create a string variable

3. For each Row in the spreadsheet, append the required data to the string variable

4. Create a new file passing the string variable to the 'File Contents' property

As below;

1.png

HTH

Jay

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

Highlighted
Super User II
Super User II

Re: When I create a new file, I do not get the correct result as in the Excel file?

So.... the 'Convert file using Onedrive' only works for file in Onedrive... if the files are in SharePoint, you need to copy them to OneDrive convert them and then use the SharePoint 'Create File' action to place the file... example below, noting you'd also need to add logic to clean-up the 'temp' files in OneDrive.

1.png

 Or you could go for a third party connector like Encodian (lots of additional capabilities above native converters as you would expect) - Convert to PDF

 

2.png

 

HTH

Jay

-------------------------------------------------------------------------

If I have answered your question, please mark your post as Solved.

If you like my response, please give it a Thumbs Up.

 

View solution in original post

12 REPLIES 12
Highlighted
Super User II
Super User II

Re: When I create a new file, I do not get the correct result as in the Excel file?

Hey @ahmadbutt 

If I've understood your requirement correctly... you need to get each row from the spreadsheet and add this data to a newly created txt file? If so this Flow should work for you:

1. Get all the rows from the Excel sheet

2. Create a string variable

3. For each Row in the spreadsheet, append the required data to the string variable

4. Create a new file passing the string variable to the 'File Contents' property

As below;

1.png

HTH

Jay

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

Highlighted
Helper IV
Helper IV

Re: When I create a new file, I do not get the correct result as in the Excel file?

Thanks! Is it also possible to get the new .txt file exactly like the Excel table?

Highlighted
Super User II
Super User II

Re: When I create a new file, I do not get the correct result as in the Excel file?

@Hey @ahmadbutt 

I'm not sure what you mean 🙂

Can you provide an example of your input and the txt output you'd like to generate?

HTH

Jay

Highlighted
Helper IV
Helper IV

Re: When I create a new file, I do not get the correct result as in the Excel file?

@Jay-Encodian, I want to copy the same Excel table in the .txt file. So what u see in the Excel sheet I want the same in the .txt file (as a table).

 

Highlighted
Super User II
Super User II

Re: When I create a new file, I do not get the correct result as in the Excel file?

Hey@ahmadbutt 

I've had a quick look but I can't see a way of writing in the commands for newline, horizontal tab, etc.

I've tried the standard commands, i..e '\n' '\r\n' and even the hex codes but hey are simply printed as text.

If you need to preserve the formatting couldn't you simply convert to PDF?

1.png

HTH

Jay

-------------------------------------------------------------------------

If I have answered your question, please mark your post as Solved.

If you like my response, please give it a Thumbs Up.

Highlighted
Helper IV
Helper IV

Re: When I create a new file, I do not get the correct result as in the Excel file?

How did you get that in PDF? If I change .txt to .pdf it doesn't work. Can you show it with pictures so I can understand it better?

- I don't understand the things u said about standard commands, i..e '\ n' '\ r \ n' and even the hex codes.

I am new with Flow.😅

Highlighted
Super User II
Super User II

Re: When I create a new file, I do not get the correct result as in the Excel file?

Hey @ahmadbutt 

As requested;

3.png

 HTH

Jay

-------------------------------------------------------------------------

If I have answered your question, please mark your post as Solved.

If you like my response, please give it a Thumbs Up.

 

 

Highlighted
Helper IV
Helper IV

Re: When I create a new file, I do not get the correct result as in the Excel file?

I use Sharepoint. I don't see that option for Sharepoint. So it can only be done with OneDrive?

 

I have done this already with - copy file and get file metadata. It is a bit the same but you do it with .PDF. 

Highlighted
Helper IV
Helper IV

Re: When I create a new file, I do not get the correct result as in the Excel file?

Thanks for helping me @Jay-Encodian .

 

Maybe u know this also? I can't load that specific table, from range B8 to I9. U know if this is possible? If I delete all the other things than it works.

apk-screen.png

 

apk1.png

 

Highlighted
Super User II
Super User II

Re: When I create a new file, I do not get the correct result as in the Excel file?

So.... the 'Convert file using Onedrive' only works for file in Onedrive... if the files are in SharePoint, you need to copy them to OneDrive convert them and then use the SharePoint 'Create File' action to place the file... example below, noting you'd also need to add logic to clean-up the 'temp' files in OneDrive.

1.png

 Or you could go for a third party connector like Encodian (lots of additional capabilities above native converters as you would expect) - Convert to PDF

 

2.png

 

HTH

Jay

-------------------------------------------------------------------------

If I have answered your question, please mark your post as Solved.

If you like my response, please give it a Thumbs Up.

 

View solution in original post

Highlighted
Super User II
Super User II

Re: When I create a new file, I do not get the correct result as in the Excel file?

@ahmadbuttwe need to be little careful here for the sake of the forum 🙂

If there are new issues we should really post them as new threads and mark the solved issues as solved... it helps other users when they are trying to find resolutions for the same challenges.

My best

Jay

Highlighted
Helper IV
Helper IV

Re: When I create a new file, I do not get the correct result as in the Excel file?

Oke, will do that. Thanks for the help @Jay-Encodian !

 

If you got more time to help, see https://powerusers.microsoft.com/t5/Building-Flows/Can-t-load-a-Table-from-Excel-spreadsheet-xlsx-fi... 😋

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

FirstImage

Microsoft Ignite 2020

Check out the announcement of Power Platform content at Microsoft Ignite!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (3,757)