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

Migration of Excel to PBI Report Server has a bug

Hi,

 

I'm tasked with migrating a clients Report Server to PBI Reporting Services.  They have 100's of excel reports which I need to move across and to make life easier I scripted the task in PowerShell, this is where i noticed a bug.

The following PowerShell scripts are not working properly for excel files (.xslx , .xlsm , .xls). They put them under the "Resource" heading in PBIRS.

Write-RsRestCatalogItem

Write-RsCatalogItem

Write-RsFolderContent

Write-RsRestFolderContent

 

When uploading manually however a file is placed under the "Excel Workbooks" heading.

 

Can this please be fixed

Status: Needs Info
Comments
Anonymous
Not applicable

@Jake91 ,

Could you please share the full PowerShell script that you use to upload Excel? I will test it on my side. Please mask senstive information when you upload PowerShell Script in this forum.

Regards,
Lydia

Anonymous
Not applicable
 
Jake91
Frequent Visitor

Hi @Anonymous ,

 

I extracted a simple example:

#Import the nessesary Microsoft RS Modules
#Install-Module -Name ReportingServiceTools

#PBIRS details
$PBIReportPortalUri = "http://mypbirs/Reports"
$PBIReportServerUri = "http://mypbirs/ReportServer"

#Get initial list of files
$FileDirectory = "D:\Files" #contains (csv,xls,xlsx,xlsm) 
$ListOfFiles = Get-ChildItem -Path $FileDirectory -Recurse |Out-GridView -PassThru

#Attempt to load these into PBIRS

foreach($file in $ListOfFiles)
{    
    Write-RsRestCatalogItem -ReportPortalUri $PBIReportPortalUri -Path $file.FullName -RestApiVersion v2.0 -RsFolder "/Test Files" -Verbose -Overwrite #Folder I created on PBIRS end  
}

With this command it classifies the .XLSX & .XLS and "Excel Workbook", but classes .XLSM & .CSV as "Resource"

 

Write-RsRestCatalogItem.PNG

If however I upload manually through the portal, they appear as Excel Workbooks.  The functionality between the portal and the Rest PSH command should be the same but it's not.

 

Portal Load.PNG

 

Thanks,

Jake

Jake91
Frequent Visitor

@Anonymous