cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Kesh
Helper III
Helper III

adding a line with dynamics excel file

Hi, I have a dynamic excel file with all the same culumn. I havethe file id and the table id as variable.

My issue is inserting values:

 

 

 

what I want in the code:

 

        "parameters": {
            "source": "me",
            "drive": "b!C18S6q5XaEWPemZ_uQ-Nvy5usUqQaARErAz1Ltm51eSbmvbTcfWARqvRwK8CuNnC",
            "file": "@variables('Fichier')",
            "table": "@variables('tab')",
			"item/col1": "a",
			"item/col2": "z",
			"item/col3": "e"
        }

 

 

 

if I do like such capture

Capture.PNG

 

This is what I have in the code

 

        "parameters": {
            "source": "me",
            "drive": "b!C18S6q5XaEWPemZ_uQ-Nvy5usUqQaARErAz1Ltm51eSbmvbTcfWARqvRwK8CuNnC",
            "file": "@variables('Fichier')",
            "table": "@variables('tab')",
            "item": "\"item/col1\": \"a\",\n\"item/col2\": \"z\",\n\"item/col3\": \"e\""
        },

 

if I insert double brackets (begining and at the end of the "Line"'s field) A new empty line is created in excels files. So the connection works but brackets fail everithing.

How could I remove those "/" & double quotes added in the source code.

 

thank you in advance,

Kind regards

3 REPLIES 3
Masa_
Helper I
Helper I

@Kesh 

I may not understand your question, but I will reply.

This is the procedure for inserting a, z, and e into the three columns col1, col2, and col3, respectively.

  1. In Excel, set the table including col1, col2, col3
  2. Select the table you set earlier in the Add Row to Table action
  3. The form of the column included in the selected table is displayed, so set the value.

I used google translate.

Regards,

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Masa2021-02-23_14h53_16.png

Kesh
Helper III
Helper III

THank you for your answer,

I have many excels with always the same structure :

-same table

-same columns

 

All I want to change i the flow is to change tha excel file.

So I dynamicly stored the path of the file and the table name.

But when I try to add the culumn name the code let appears som backslash and double quotes.

 

Because of these chars, the flow fail. ho could I fix it?

 

kind regards

 

I don't think this action can recognize the table correctly because there is only one row in [Ligne], not the actual number of columns.
Is it possible to select a Table item from a drop-down menu instead of a dynamic value?

 

Perhaps the current standard Power Automate actions do not support dynamic values for filenames and table names.
I think you can do that via the Graph API.
https://docs.microsoft.com/en-us/graph/api/resources/excel?view=graph-rest-1.0

 

Add table row

POST /{version}/me/drive/items/01CYZLFJDYBLIGAE7G5FE3I4VO2XP7BLU4/workbook/tables('4')/rows
content-type: Application/Json 
authorization: Bearer {access-token} 
workbook-session-id: {session-id}

{ "values": [ [ "Jan-15-2016", "49", "37" ] ], "index": null }

I used google translate.

Regards,
Masa

--------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

 

Helpful resources

Announcements
User Groups Public Preview

Join us for our User Group Public Preview!

Power Automate User Groups are coming! Make sure you’re among the first to know when user groups go live for public preview.

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Users online (59,006)