Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi everyone!
I recently create a custom connector but I'm not sure if it's posible to use an url that already has the data in a xlsx format without getting this error
This is where I think it's the problem, but i'm not sure if there's a native function to just present the data as I have it on the api (xlsx format)
CCE.Contents = (url as text) =>
let
content = Web.Contents(url),
link = GetNextLink(content),
json = Json.Document(content),
table = Table.FromList(json, Splitter.SplitByNothing())
in
table meta [Next = link];
Thanks in advance 🙂
Solved! Go to Solution.
Hi @paocohe ,
Please try:
CCE.Contents = (url as text) =>
let
content = Web.Contents(url),
workbook = Excel.Workbook(content),
// Assuming there's only one sheet and you want the first table
sheet = workbook{0}[Data],
table = if Table.RowCount(sheet) > 0 then sheet else error "No data found"
in
table;
Please note that you'll need to adjust the index to select the correct sheet from the workbook, and you may need to handle multiple sheets or named items depending on your xlsx file structure.
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum -- China Power BI User Group
Hi @paocohe ,
Please try:
CCE.Contents = (url as text) =>
let
content = Web.Contents(url),
workbook = Excel.Workbook(content),
// Assuming there's only one sheet and you want the first table
sheet = workbook{0}[Data],
table = if Table.RowCount(sheet) > 0 then sheet else error "No data found"
in
table;
Please note that you'll need to adjust the index to select the correct sheet from the workbook, and you may need to handle multiple sheets or named items depending on your xlsx file structure.
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum -- China Power BI User Group
thanks i was able to make it work with your suggestion 🙂