Forum Discussion
aflesner
Apr 29, 2023Copper Contributor
Convert CSV to Excel Office Script
I created the convert csv to excel office script from the template. I used it in power automate to convert all csv files in a folder to excel. It worked great until today now I am receiving and error "selectedsheet not defined". How can I fix this?
- LorenzoSilver Contributor
Suggestion: Post your issue on the dedicated Power Automate forum with your complete script
Perhaps you mean this Convert CSV files to Excel workbooks - Office Scripts | Microsoft Learn template in which sheet name is defined explicitly ( as "Sheet1"). Be sure all csv files have sheet with such name.
As variant most probably script could be modified to select the sheet not by name but by position, e.g. first sheet in the file.