Forum Discussion

Matthias93's avatar
Matthias93
Helper III
9 years ago
Solved

Excel data source name change

Hi,

 

This may be a very basic question, but I was wondering how I can adapt my query to a name change in my excel data source. When I go to the advanced query editor, I currently have this source:

 

Source = Excel.Workbook(File.Contents("\\k2-a.be.example.com\DavWWWRoot\sites\DC\Project\DEV-RPM\Dashboard excels\Retention.xlsx"), null, true),

 

This excel is stored in a SharePoint document library. If I were to change the name of this excel on SharePoint, could I simply replace 'Retention.xlsx' to 'Retention2017,xlsx' for example without losing relationships and visuals connected to this excel?

 

Thanks in advance for helping

 

Kind regards,

Matt

7 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Matthias93 As long as it's just the name of the Excel file, then you shouldn't have any issues making the change as you describe.

    If you are really converned about the PBIX, you can just "Save As" a copy of it and "test" the connection change with both files in the data source location. 

    • TimKroemer's avatar
      TimKroemer
      Frequent Visitor

      Anonymous Thank you for your reply Eno - can you also please help, what to do if the name of the source sheet has changed? I have a standard report but the name of that report has been changed - resulting in a different sheet name in the Excel file now containing the data - I can point PowerBI to the new file - but how do I tell it the new Excel sheet name? 

       

      Thank you in advance for your time and help!

       

      Gratefully,

       

      Tim

      • Anonymous's avatar
        Anonymous
        Not applicable

        TimKroemer As long as the data structure hasn't changed you shouldn't have any issue editing the query.

        Edit Queries -> Edit Queries -> Advanced Editor

        Replace the file name under Source

        And the tabs should show up something like "ztest_Sheet = Source{[Item="test",Kind="Sheet"]}[Data],"

        You can see that originally I pulled in a tab called "ztest", then I changed the actual source file and changed the tab name to just "test" which I replace in that connection string. Works fine.