Share via

Cell value based on URL Query string parameter in web embedded excel sheet ?

Anonymous
2024-06-12T14:42:44+00:00

Hello,

I have an excel file that is stored in a sharepoint folder. I want to share that file internally by providing a web link so that the people I share it with can view it as a web page. I have sucessfully used the Embed feature to generate the proper link, and played with the URL query string to display what I want.

Now, what I'm trying to achieve is to pass some data to excel through the query string. I want to retrive a value from there, and have a cell in excel to be set to this value when it opens.

For example, let's say my file is a quoting model, and I have a cell that contains the currency. I want to share it with:

  • Anna, working in our French subsidiary, and quoting in Euros
  • Chris, working in ou US subsidiary, and quoting in USD

So I would like to be able to generate a link to my file that allows to pass this information:

And of course have my currency cell filled with "EUR" or "USD" depending on the link that was used. I've struggled to find any information, and I wonder if it is at all possible (maybe it's not for security resons ?)...

Can anyone help me with achieving this, or (sadly) confim that this is not possible ? Or maybe there's a better way to achieve this ?

Thanks,

Michael

Microsoft 365 and Office | Excel | For business | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

6 answers

Sort by: Most helpful
  1. Anonymous
    2024-06-18T23:23:02+00:00

    https://view.officeapps.live.com/op/view.aspx?src=http://e.anyoupin.cn/ceshi/viewdocx/docx/2.xlsx

    This api not work now but it worked last year.

    if only data without format,you can import Excel to database and then retrieve contents with sql.

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2024-06-18T23:19:09+00:00

    Hi, thanks for taking the time to answer.

    I agree that having different pages is the straighforward way to go for different content. But I want to keep a single Excel file, and use the embed link to access it. So even with two different pages, each with an iframe pointing my online excel file, I would need a way to pass a parameter from the page to the Excel file, hence my question to retrieve a parameter from the URL

    https://support.microsoft.com/en-us/office/share-it-embed-an-excel-workbook-on-your-web-page-or-blog-from-onedrive-804e1845-5662-487e-9b38-f96307144081

    Generate url by random.

    (as Javacript inline code has been disabled from sharing options)

    Michael

    I see you want to parse .xlsx like office online.

    You need a server because o365 no support.

    1,office online server

    https://learn.microsoft.com/en-us/officeonlineserver/office-online-server-overview

    2,https://www.onlyoffice.com/

    3,php https://github.com/PHPOffice/PhpSpreadsheet

    http://e.anyoupin.cn/eh3/word/show\_docx.php?doc=http://e.anyoupin.cn/ceshi/viewdocx/docx/2.xlsx

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2024-06-18T06:40:49+00:00

    Hi, thanks for taking the time to answer.

    I agree that having different pages is the straighforward way to go for different content. But I want to keep a single Excel file, and use the embed link to access it. So even with two different pages, each with an iframe pointing my online excel file, I would need a way to pass a parameter from the page to the Excel file, hence my question to retrieve a parameter from the URL (as Javacript inline code has been disabled from sharing options)

    Michael

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2024-06-12T23:25:32+00:00

    Hello,

    I have an excel file that is stored in a sharepoint folder. I want to share that file internally by providing a web link so that the people I share it with can view it as a web page. I have sucessfully used the Embed feature to generate the proper link, and played with the URL query string to display what I want.

    Now, what I'm trying to achieve is to pass some data to excel through the query string. I want to retrive a value from there, and have a cell in excel to be set to this value when it opens.

    For example, let's say my file is a quoting model, and I have a cell that contains the currency. I want to share it with:

    • Anna, working in our French subsidiary, and quoting in Euros
    • Chris, working in ou US subsidiary, and quoting in USD

    So I would like to be able to generate a link to my file that allows to pass this information:

    And of course have my currency cell filled with "EUR" or "USD" depending on the link that was used. I've struggled to find any information, and I wonder if it is at all possible (maybe it's not for security resons ?)...

    Can anyone help me with achieving this, or (sadly) confim that this is not possible ?

    Or maybe there's a better way to achieve this ?

    Do you mean the Better way is dynamic web like our forum or url like below?

    Different id different contents.

    https://e.anyoupin.cn/EData/1282.html

    https://e.anyoupin.cn/EData/1280.html

    If so,you can develop your own site with PHP or ASP.NET.

    Thanks,

    Michael

    Was this answer helpful?

    0 comments No comments
  5. Anonymous
    2024-06-12T21:41:27+00:00

    Hi Michael,

    Thanks for posting in the community. We are happy to help you.

    According to your description, my understanding is that you want to customize the file URL so that different users can view different content depending on their location.

    If not, please point it out and let us know.

    If so, I have searched a lot but didn't find any way to meet your needs.

    Also, we welcome community members to share ideas about the situation if one has related experiences.

    Sincerely, 

    George | Microsoft Community Moderator

    Was this answer helpful?

    0 comments No comments