Forum Discussion
Import Data from several Excel files
- 5 years ago
Hey Manuel123 ,
that should not be a problem. You can create the function with a local file (C:\...) and later just change the local vs the web content.
After creating the transformations from the local file, the code in the advanced editor should begin like this:
let Source = Excel.Workbook(File.Contents("C:\Users\myUser\OneDrive - myCompany\Projects\myFile.xlsx"), null, true), ...This you can change from File.Contents to Web.Contents:
let Source = Excel.Workbook(Web.Contents("C:\Users\myUser\OneDrive - myCompany\Projects\myFile.xlsx"), null, true), ...Also you have to use the parameter. So you can change both at the same time.
For example create a parameter PathToXLSX:
And then you have to change it to Web.Contents and the parameter:
let Source = Excel.Workbook(Web.Contents(PathToXLSX), null, true), ...Like this you can create the transformations with the local file. Later in the step 2 the parameter will be replaced by the full Sharepoint URL, something like:
https://company-my.sharepoint.com/personal/myUser/Documents/Projects/myFile.xlsxIf you need any help please let me know.If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍Best regardsDenisBlog: WhatTheFact.biFollow me: twitter.com/DenSelimovic
Hey Manuel123 ,
that should not be a problem. You can create the function with a local file (C:\...) and later just change the local vs the web content.
After creating the transformations from the local file, the code in the advanced editor should begin like this:
let
Source = Excel.Workbook(File.Contents("C:\Users\myUser\OneDrive - myCompany\Projects\myFile.xlsx"), null, true),
...
This you can change from File.Contents to Web.Contents:
let
Source = Excel.Workbook(Web.Contents("C:\Users\myUser\OneDrive - myCompany\Projects\myFile.xlsx"), null, true),
...
Also you have to use the parameter. So you can change both at the same time.
For example create a parameter PathToXLSX:
And then you have to change it to Web.Contents and the parameter:
let
Source = Excel.Workbook(Web.Contents(PathToXLSX), null, true),
...
Like this you can create the transformations with the local file. Later in the step 2 the parameter will be replaced by the full Sharepoint URL, something like:
https://company-my.sharepoint.com/personal/myUser/Documents/Projects/myFile.xlsx
Dear selimovd ,
this worked perfectly fine. Thank you so much. Maybe you can have a look at another problem I have: Replace Text in all columns but first one
BR
Manuel