First post here but have been using the forum for help for a while now.
I have a template excel with some complicated formatting to include the print area set up for the right formatting. My RPA needs to create a new Excel for a dynamic amount of sheets. The sheet amount could vary anywhere from 1 to 15 but the template needs to be on each sheet created. This template comes from the template Excel file I have that I do not want edited.
I have no issues creating the dynamic amount of sheets based on the user input but the formatting the template onto the sheets is the issue. I have used Excel Application Scope and Read Range to copy the template excel into a DataTable variable and then used Excel Application Scope and Write Range with the DataTrable variable in Write Range. This method copies the text but 0 formatting (i.e. borders, column/row widths, merged cells, etc). (Note: I did check “PreserverFormat” in Read Range).
The other method I tried was to use Hot Keys and Ctrl-A, Crtl-C the template excel then Hot Keys again to Ctrl-V but the same result as above. The output excel only had the text and none of the formatting.
I have searched the forums a lot for an answer but cannot find a solution.
A possible further solution I have not got to work is to use the template excel and create as many sheets as the user desires based off copying the original sheet and then renaming them with a For Each loop but that is also giving me trouble.
Any help would be appreciated!