Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
Hey Power Bi community
I have a customer who wants to see all my beautiful power BI reports in Excel.
Why?
I don't know, maybe their parents hit them when they was a child and now they want to take revenge on me.
What ever the reason is I helped them and told them how to download their excel file.
All was fine and good for a while, but now they want me to run this code whenever they download their excel file.
function main(workbook: ExcelScript.Workbook) {
let selectedSheet = workbook.getActiveWorksheet();
// Auto fit the columns of range A:A on selectedSheet
selectedSheet.getRange("A:A").getFormat().autofitColumns();
// Auto fit the columns of range B:B on selectedSheet
selectedSheet.getRange("B:B").getFormat().autofitColumns();
// Auto fit the columns of range C:C on selectedSheet
selectedSheet.getRange("C:C").getFormat().autofitColumns();
// Auto fit the columns of range D:D on selectedSheet
selectedSheet.getRange("D:D").getFormat().autofitColumns();
// Auto fit the columns of range E:E on selectedSheet
selectedSheet.getRange("E:E").getFormat().autofitColumns();
// Auto fit the columns of range F:F on selectedSheet
selectedSheet.getRange("F:F").getFormat().autofitColumns();
// Set range F4 on selectedSheet
selectedSheet.getRange("F4").setFormula("=F9");
// Set range F4:F7 on selectedSheet
selectedSheet.getRange("F4:F7").setFormulas([["=F9"],["=F16+F23+F40+F64+F70"],["=F4+F5"],["=IF(F4=0,0,(F6/(F4)))"]]);
// Set range F9 on selectedSheet
selectedSheet.getRange("F9").setFormula("=SUM(F10:F15)");
// Set range F16 on selectedSheet
selectedSheet.getRange("F16").setFormula("=SUM(F17:F22)");
// Set range F23 on selectedSheet
selectedSheet.getRange("F23").setFormula("=SUM(F24:F39)");
// Set range F40 on selectedSheet
selectedSheet.getRange("F40").setFormula("=SUM(F41:F63)");
// Set range F64 on selectedSheet
selectedSheet.getRange("F64").setFormula("=SUM(F65:F69)");
// Set range F70 on selectedSheet
selectedSheet.getRange("F70").setFormula("=SUM(F71:F78)");
}
Is it possible to do this without getting power automate involved?
And if I have to get power Automate involced do any of you know how big of a task this is?
All help is greatly appreciated.
Solved! Go to Solution.
@ThomasWeppler , You can check this video it will give some idea
https://www.youtube.com/watch?v=v-_joMcPpLI
Proud to be a Super User! |
|
@ThomasWeppler , You can check this video it will give some idea
https://www.youtube.com/watch?v=v-_joMcPpLI
Proud to be a Super User! |
|