Forum Discussion

Baqa's avatar
Baqa
Frequent Visitor
2 years ago

Need to call a Excel file from google Drive in Power BI (Dataflow)

I have an Excel file in my Google Drive when I try to call it using this query

let
in
Source

it always returns this error:

DataSource.Error: This operation is not supported for this document
Details
Reason = DataSource.Error
errorstatus = FAILED_PRECONDITION
errormessage = This operation is not supported for this document
errorcode = 400

Can anyone help me with this?


1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Baqa 

     

    Based on the error message you've shared, it seems like there's a misunderstanding in the method used to access the file. The GoogleSheets.Contents function is specifically designed for accessing Google Sheets, not Excel files. This is likely the reason behind the DataSource.Error you're encountering. 

     

    To access an Excel file stored on Google Drive, you may try the following method, which may be helpful. 

     

    Connect to Google sheet with the method from this link How to connect Power BI to Google Sheets?

    When publishing to the web, choose to export it as an Excel workbook. Then connect to this file with Web connector. So in Advanced Editor, the source step is like below.

    Source = Excel.Workbook(Web.Contents("https://docs.google.com/spreadsheets/d/e/2PACX-xxxxxxxxxxxx_KZe0mn4/pub?output=xlsx"), null, true)

     

    Best Regards,
    Jing
    If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!