How can I connect Power Bi from VBA to export lot of data more than the limit
I am using the following Power Bi Script
Can VBA export a lot of data?
# Connect using ADOMD.NET (power shell script)
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.AnalysisServices.AdomdClient")
#[Microsoft.AnalysisServices.AdomdClient.AdomdConnection]
# Create the first connection object
$con = new-object Microsoft.AnalysisServices.AdomdClient.AdomdConnection
$con.ConnectionString = "Datasource=$dataSource; Initial Catalog=$Database_Name;timeout=0; connect timeout =0"
$con.Open()
"Datasource= " +$dataSource
"Database_Name= " +$Database_Name
$filename = "Table1.csv"
# Create a command and send a query
$command = $con.CreateCommand()
$command.CommandText = $query
$adapter = New-Object -TypeName Microsoft.AnalysisServices.AdomdClient.AdomdDataAdapter $command
$dataset = New-Object -TypeName System.Data.DataSet
$adapter.Fill($dataset)
$dataset.Tables[0] | export-csv $filename -notypeinformation