Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
paocohe
Frequent Visitor

Display of data not right

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

paocohe_0-1707939196225.png

 

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 🙂

1 ACCEPTED SOLUTION
Anonymous
Not applicable

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

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

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 🙂

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.