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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

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
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors