I can use only Azure cloud shell to run powershell scripts. I'm trying to run script for getting tags for all resources and populating the data into Excel sheet using ImportExcel module. Though I'm able to read data from excel file using the code as below, $worksheet.Cells['A1'].Value
, When I try to write the values into excel cells using $worksheet.Cells['A1'] = "Tag Name"
, I get Unable to index into an object of type "OfficeOpenXml.ExcelRange" error. I think it is because of using Azure cloud shell to run my script, not powershell command line on windows. But, I can only run the scripts on my cloud shell. Someone please help.
Also please let me know what all next code steps have to be used to save the excel file (with data written to it) which is located in storage account of cloud shell.