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
Anonymous
Not applicable

Error - Active Scripting Needed

Hello,

 

I'm trying to use NetSuite's WebQuery to automatically pull data into Excel and Power BI. It works really well sometimes, but it seems like bigger files have an issue. The error I'm getting is:

DataSource.Error: The Web.Page function requires Active Scripting to be enabled in Internet Explorer options.

 

We don't use Internet Explorer, so I'm not sure what to do. I thought I read somewhere that the issue is that the error happens if Power Query starts to scrape the HTML file before it's fully loaded. There is a site that talks about Function.InvokeAfter to introduce a delay. I'm wondering if anyone has heard of this? Is this a potential solution for my issue? And, if so, what's the correct syntax? I can't find any examples using a web query string.

 

Unfortunatly, I can't share the web query string in this post.

7 REPLIES 7
cpwebb
Microsoft Employee
Microsoft Employee

Which version of Excel are you using? Can you try using the latest version of Power BI Desktop and seeing what code it generates for you? I suspect Power BI Desktop will use the Web.BrowserContents function which should work better.

Anonymous
Not applicable

Hello,

Here is the version of Excel we're using:

JMikes_3-1689606425692.png

 

Anonymous
Not applicable

Hello,

I tried Power BI. It fails before it even gets to the Navigator. So, I used a smaller Web Query (different report) that I knew would work. It did use the Web.BrowserContents. I tried to edit it using the problematic URL and added the WaitFor parameter and this is what I got:

JMikes_2-1689606248202.png

 

cpwebb
Microsoft Employee
Microsoft Employee

OK, well that error message seems conclusive: it's running out of memory, I assume because there's too much data. I don't think you'll be able to work around this so you have no choice but to find another way of connecting Power BI to your data.

Anonymous
Not applicable

Darn. Thanks so much for your advice!

cpwebb
Microsoft Employee
Microsoft Employee

Are you writing M code that uses the Web.Page function, or is it being generated for you somehow? Either way it's not an efficient way of getting large amounts of data and has been superceded by the Web.BrowserContents function, which isn't an efficient way of getting data into Power BI either - both Web.Page and Web.BrowserContents are meant to be used for web scraping, which usually involves relatively small data volumes.

Anonymous
Not applicable

Thanks for your response!

 

I am a novice. I am using the code generated by Power Query and then trying to edit based on information I found online. I've started with Excel and then hope to do the same in Power BI. I just can't get it to work and don't know if I'm even pursuing the right solution. I agree it's not the most efficient way to get the data. There is an ongoing project intended to get all of our NetSuite data (along with other independent systems) into a data warehouse. Unfortunately, due to budget constraints, my division is on hold until sometime next year so I only have Web Query to work with. If I could get this to work, it would save a lot of time even if that meant refreshing the data and stepping away for a few minutes while it refreshes.

 

Here is what I tried, but it still doesn't work:

let
Source = Function.InvokeAfter(() => Web.Page(Web.Contents("https://...")),#duration(0,0,5,0)),
Data0 = Source{0}[Data],
#"Promoted Headers" = Table.PromoteHeaders(Data0, [PromoteAllScalars=true]),
#"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"Accounting Period: Name", type date}, {"Transaction Date", type date}, {"Transaction Type: Long Name", type text}, {"Document Number", type text}, {"Entity (Line): Name", type text}, {"Memo", type text}, {"Description", type text}, {"Source Document Description", type text}, {"Originating Document Number", type text}, {"Amount (Gross)", type text}, {"Department: Name", type text}, {"Category:Product: Name (Grouped)", type text}, {"Sales Channel: Name", type text}, {"Source Channel: Name", type text}, {"Region: Name", type text}, {"Subsidiary: Name", type text}, {"Campaign Expense Category: Name", type text}, {"Marketing Campaign: Name", type text}, {"Currency: Name", type text}, {"Item", type text}, {"Account Number", Int64.Type}, {"Account Name", type text}})
in
#"Changed Type"

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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

Top Solution Authors