cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
soumya_12
Helper V
Helper V

format to use for converting list values to data table

 I have  a list(using 'Add items to list') in power automate desktop , after I performed actions like 'Remove duplicate items in the list'. I have to change the list values(generic value type) to data table (with data rows), the data coming from the action 'remove duplicate items in the list'. As I need to write the data back to a excel file. 

 

My list contains dynamic values , as every time it will be changing. not specific one's, based on the file content keeps changing every time . So kindly suggest what format to use for converting list values to data table, as I need to write back again in to the excel file in the same flow.

 

Thanks in advance , expecting quick response.

2 ACCEPTED SOLUTIONS

Accepted Solutions

I would remove the filter on your old Excel Data, select All, Delete, and write in your new data per our other conversation.  If it's tied to a Database, I warn you about overwriting the data, but if it simply is a copy of results from a DB query, then just delete it and replace with your data.

View solution in original post

Are we talking about "Delete All"?  If so:

Send Keys {Control}(a)

Send Keys {Delete}

Select Cells in Excel A1:A1

View solution in original post

7 REPLIES 7
MichaelAnnis
Super User
Super User

I saw your other post.  Being that this is what you end up with:

Item 1, Result 2

Item 2, Result 2

 

I would do as you suggested, write to excel, text to columns (delimited by comma).  Then, if you need the data table back in PAD, read from Excel.

 

On another note, in your other post.  I will comment a possibly more efficient solution.

Best of luck!

@MichaelAnnis , I replied in other post too for more detailed explanation. I have 7 columns in excel & rows will not be fixed , as it keeps varying with file content.

 

Didn't get this part , may be a bit detailed explanation for this please.

Item 1, Result 2

Item 2, Result 2

 

I would do as you suggested, write to excel, text to columns (delimited by comma).  Then, if you need the data table back in PAD, read from Excel.

@MichaelAnnis to put it simple & more clear. 

The main aim is to remove the repeated items( overwrite the present data with new data) in my excel file.  As I have a database filtering all the duplicates with (primary key as ID column), but as I have only 1 database storing all the data & have to apply some filters on the data. So this flow is triggered by cloud flow (when an file is created) & then stores in DB & then applying filters.

 

The main issue here is , as filter( The query to DB) applies on all the data in DB , I get the previous data along with new data . So the data in excel is written twice along with new one's. So it has to over write the old data , with new one's.

 

Attaching screenshot for reference(overwriting existing content), as we have for a text file , I couldn't find out for excel actions, so trying on the lists for add, remove duplicates  but that seem to be way more complex.

 

Kindly provide any solution for this.Overwriting the content in text fileOverwriting the content in text file

I would remove the filter on your old Excel Data, select All, Delete, and write in your new data per our other conversation.  If it's tied to a Database, I warn you about overwriting the data, but if it simply is a copy of results from a DB query, then just delete it and replace with your data.

Thanks a lot @MichaelAnnis for your quick response. Appreciate it.

But here , the actions in desktop flow is different , i tried achieving the same as you mentioned above . But the actions in desktop flow can't perform those actions.

 

Attaching the screenshots for references. Where in no action for deleting range of cells , have only this action 'delete a specified cell '  & next action is 'select action'-> 'selecting range of cells' actions doesn't provide variable, to delete them in next action. Kindly suggest the ways.

 

Thanks again, it would be really helpful.delete action.pngselect cells action.png

Are we talking about "Delete All"?  If so:

Send Keys {Control}(a)

Send Keys {Delete}

Select Cells in Excel A1:A1

Thank you , will try this workaround.

Helpful resources

Announcements
 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Top Solution Authors
Users online (2,610)