cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
HydrogenUtility
Advocate II
Advocate II

Updating row in Excel Table with HYPERLINK() works, but also updates all rows above!

Hi All, perhaps a curly one:

I can update the rows of a given Excel table perfectly. I'm using a 'child' flow which does this single job carrying variables from a 'parent flow' of much greater complexity.

The table in question has the following headers:

Received DateFromDoc CountDeliverable CodeLink Out

 

Everything gets updated correctly except the Link Out which updates the row AND every row above with the current link!

Received DateFromDoc CountDeliverable CodeLink Out
Tuesday, March 09, 2021 4:42 PMfake@email.com2code code codeLINK was unique now same as below
Tuesday, March 09, 2021 4:43 PMfake@email.com1code code codeLINK updates link above too

 

 The operative part of the flow is shown here:

Image 9-3-21 at 4.54 pm.jpg

Could there be an excel specific issue related to the function =HYPERLINK("http://link.link.link", "LINK")?

 

Any help greatly appreciated!

2 ACCEPTED SOLUTIONS

Accepted Solutions
Yutao
Microsoft
Microsoft

The following trick worked for me, although a bit tedious and somewhat strange:

* Open this workbook in desktop Excel.

* Go to File -> Options -> Proofing -> AutoCorrect Options -> AutoFormat As You Type, uncheck "Fill formulas in tables to create calculated columns":

Yutao_1-1615356673410.png

* Now back to the table that contains hyperlinks (still in desktop Excel), update one of the existing hyperlink cells to have a different link address. Excel would show a warning for inconsistent calculated column formula. Ignore it.

* Save and close the workbook.

* From now on, the add row operations from Power Automate should be able to create different hyperlinks for different rows.

View solution in original post

@HydrogenUtility -

 

Sorry I'm also not sure where to find that option in Mac Excel. But if you can run VBA in Mac Excel, you probably can try running the VBA code below and see if that works. I tried it at least in Windows Excel and it indeed turned off that option for me.

 

Application.AutoCorrect.AutoFillFormulasInLists = False

 

Hope this helps!

View solution in original post

19 REPLIES 19
jinivthakkar
Super User
Super User

@HydrogenUtility this is a specific issue with flow function I was able to reproduce the issue, even in my case it  updates the last link with all other existing link 

 

jinivthakkar_0-1615296685414.png

 

I also tried using the concat function like :

 

concat('=HYPERLINK("',outputs('Compose'),'"',',','"','Link4','")')
 
but even then the behavior is same. Please reach out to Microsoft if you have premium support.
 
Hope this helps.
 
--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.
Yutao
Microsoft
Microsoft

The following trick worked for me, although a bit tedious and somewhat strange:

* Open this workbook in desktop Excel.

* Go to File -> Options -> Proofing -> AutoCorrect Options -> AutoFormat As You Type, uncheck "Fill formulas in tables to create calculated columns":

Yutao_1-1615356673410.png

* Now back to the table that contains hyperlinks (still in desktop Excel), update one of the existing hyperlink cells to have a different link address. Excel would show a warning for inconsistent calculated column formula. Ignore it.

* Save and close the workbook.

* From now on, the add row operations from Power Automate should be able to create different hyperlinks for different rows.

Interesting solution and I can see how that would be the problem. I'm in the MacOS excel though and the option for 'Fill formulas in tables to create calculated columns' is currently eluding me. I'll explore where the option is in this version and complete my test.

Thanks for the tests on your end @Yutao and for corroboration @jinivthakkar 

 

HydrogenUtility
Advocate II
Advocate II

Further to this:

I have not been able to discover how to reproduce Windows Excel off-line application File -> Options -> Proofing -> AutoCorrect Options -> AutoFormat As You Type on MACos.

All I have gotten to is: Excel -> Preferences -> AutoCorrect where the Autoformat As You Type option is absent.

Any further ideas on how to manage this (or where this option is located) would be appreciated. That is in lieu of taking the file offline in a windows environment and making the option there. One assumes the options as sent in Windows offline environment would embed in the document and be current in all online incarnations?

 

@HydrogenUtility -

 

Sorry I'm also not sure where to find that option in Mac Excel. But if you can run VBA in Mac Excel, you probably can try running the VBA code below and see if that works. I tried it at least in Windows Excel and it indeed turned off that option for me.

 

Application.AutoCorrect.AutoFillFormulasInLists = False

 

Hope this helps!

This from @Yutao , appended to the earlier suggestion from @jinivthakkar has solved my problem. One caution though is that by running a VBA in the excel desktop MACos the file required saving as "macro enabled". Once saved this way it no longer can be accessed by the original flow where this problem originated.

The workaround:

1) Run the VBA in desktop app

2) save as macro-enabled workbook (appears on SharePoint, no Power Automate access [*.xlsm])

3) rename the workbook in OneDrive (can't access file extension in SharePoint) to *.xlsx

4) reconnect in Power Automate.

Yutao
Microsoft
Microsoft

@HydrogenUtility  - glad to hear you've solved the problem! Although the fact that you had to save the workbook as "macro enabled" was kind of a bummer...

 

After thinking about it for a bit more and doing some further experiment, I feel the actual trick was probably just to break the "pattern" within the same column. Once you have one cell in that column with a hyperlink different than others, you can start to add rows with different hyperlinks afterwards.

 

By default, Excel will always automatically apply the hyperlink you've entered into a single cell to all the other rows. Here you can just press "CTRL+Z" (or "CMD+Z" on Mac ) to undo the auto-fill. After that, editing a single cell's hyperlink won't affect other cells any more.

 

Here is a simple screen recording to demonstrate this trick. You don't need to run any VBA macros or set any auto-correct options. Once a table has been treated like this, the Add table row actions in Power Automate should be able to add any hyperlinks to the table without affecting other rows.

 

disable-auto-correct.gif

 

Something to consider...

Yes! Of course! In fact that way is better by far. The truth is I have been manipulating that table in dev environment for so many hours that it is quite likely that this is infact what has occurred not necessarily toggling the “AutoFillFormulasInLists” via VBA, given that there’s no way I know of to see the setting change in MACOS.

 

For those turning up here, please be advised that this approach is likely the better. Thanks @Yutao 

Sidkn33
Helper I
Helper I

Hi

I have turned off the autocorrect option in Excel (Windows!) but I am seeing inconsistent results when altering one hyperlink in my table.
Sometimes, this has the desired effect, but not always. 
It seems almost random.

  1.  I run my flow, it populates the excel table, updating the hyperlink column erroneously
  2. I edit the hyperlink cell in the row 01 of the table, pointing at a different URL
  3. I delete all other rows leaving 01 with the edited hyperlink.
  4. I re-run my Flow
  5. Sometimes this works, sometimes it doesn't

I don't have "premium" support from Microsoft, any ideas how to a: get consistent behaviour and b: get input from Microsoft on a fix?

2

Can you screenshot your flow or at least the pertinent parts. Can you explain where the hyperlink is being generated and give examples of correct vs erroneous? 
In my situation this was my syntax:

=hyperlink(“http://someplace.URL”, “what to display”) but of course this is just a string until it reaches excel where it becomes a function. Is your syntax well formatted? 

Sidkn33
Helper I
Helper I

Hi, 

Firstly please see my related post that Yutao responded to by redirecting me here.

Erroneously, meaning that an excel table column containing a hyperlink is being updated in its entirety with the last iterated value.
This is my Flow

column hyperlink issue.pngcolumn hyperlink issue sheet.png


What I've found is that the fix suggested in this thread (to edit the hyperlink in the first row of the table) does not consistently fix the problem.


 

HydrogenUtility
Advocate II
Advocate II

@Sidkn33Is this behaviour still random as per your first post? Or is this a consistent error now? Because it seems identical to my error and there remains some obscurity in my case as to what fixed it. The absence of a way to uncheck "Fill formulas in tables to create calculated columns": other than the VBA script which provides no success message nor toggle state of the function in macOS means that the @Yutao workaround appears best. But can you definitively confirm you've unchecked the "Fill formulas in tables to create calculated columns" above in Excel Windows Desktop and then saved (or autosaved) the file back to Excel online? And it's definitely the right version you're interacting with via power automate?

Sidkn33
Helper I
Helper I

I haven't been able to pinpoint when all hyperlink (column) rows might be updated erroneously and yes in my case "Fill formulas in tables to create calculated columns" is unchecked and saved back to excel online (specifically, I use the "open in desktop" function, which does not involve "saving back" online.

For example, with an excel onle table, if I delete all existing rows, (except the first one with the edited hyperlink) and re-run my Flow, most of the time, the hyperlinks update correctly. but then I'll re-delete the rows and the hyperlinks will start updating the entire column with each iteration. 

I re-edit the first row hyperlink and then the error goes away again, or doesn't .....
I am confused in fact by the prospect of "Fill formulas in tables to create calculated columns" being of impact here - this is an excel app option, not file specific and not available to excel online (which is of course, Excel-As-A-Service)
So, why would this excel desktop option affect the file when interacting with it (a contained table) in excel online?
The implication is that the option when unchecked in the desktop Excel, does somehow affect how the Excel online app service works, this seems unlikely.

H2U
Frequent Visitor

Understood on your points. The only thing I can think to do as a test is to make another table-related formatting change (after all we're talking about a formatting issue here) which is clearly visible in the table and see if you can perpetuate that change from offline to online. This might be a pointer to the way in which preferences are file-specific and are carried from platform to platform in the file headers / metadata. Certainly this is demonstrable when using an *.xlsx on Windows and on macOS.

Sidkn33
Helper I
Helper I

Good suggestion, I will do some more testing.

One question though - why do you think this a formatting issue specifically? It seems to me to be a table/data/hyperlink (formatting?) formula handling problem.

It's not that the hyperlink is being formatted incorrectly (that remains correct) , the issue is that the data in every row of the hyperlink data column is being replaced with the current row/cell in an excel table.
Implying that there is a data/table based bug brought about when adding a hyperlink formatted cell into the current row, which causes all cells in the hyperlink column to be updated with the current value.  

HydrogenUtility
Advocate II
Advocate II

Indeed, I assumed this behaviour to be a bug too but after assessing the comments from @jinivthakkar and @Yutao I confirmed that, in my case at least, this was related to the auto-fill columns functionality in excel. This article is succinct: https://www.excelcampus.com/tables/prevent-table-formula-autofill/

Bear in mind that, counter-intuitively the =hyperlink syntax in excel is considered a formula as it is prefixed with ‘=‘. 
I can’t confirm this visually right now but (per that article linked) if you can reproduce the error one time then, before making any change, check the undo history (does it exist in excel online?) and see if indeed the auto-fill action was performed. 

xtree96
Frequent Visitor

I have the same problem but found a workaround. I added an empty row right below the header. Somehow it stop triggering the formula autocorrect.

Billdozer
New Member

The solution that worked for me was to create another row within the "Apply to Each" loop and Populate only the Key column with "DELETE" and the formula column with "DELETE" and then after the loop completed, I delete all rows with DELETE in the key column. This seems to breakup the rows so that the auto formula update did not trigger in Excel.  I ended up having to add some delays to give time for the cloud update to process as I am copying the file content to a new file for email delivery.  Hope this helps someone as I spent several hours getting this to work.  It is unfortunate that these bugs exist, but it seems as they often do. 😉

 

Billdozer_0-1654534551526.png

 

hemabalan
Frequent Visitor

Add a dummy row ,in thelink column -add a text type add any text then the rest of the rows will not get automatically autocorrected..

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (4,195)