- atomica.excel.copy_sheet(source, sheet_name, workbook)¶
Copy a sheet into a Workbook
This function allows values to be copied from a file into a Workbook. The main use case is to support custom sheets in databooks that are not otherwise parsed but which might need to be retained. In particular, the
ProjectDataclass does not parse ignored sheets at all, because no guarantees can be made about the quantity and type of the content, and whether there are formulas etc. that would be lost. In some cases though, it may be necessary to edit the databook and preserve specific sheets. In general, this can be done by using the
to_workbook()method and then manually performing whatever operations are necessary to preserve the content on the extra sheets. However, when the extra sheet content is extremely simple e.g. just a table of values, then this helper function can be used to facilitate copying the content.
Warning - note that Excel functions, formatting, and comments will NOT be preserved.
- Return type
None - the sheet will be added to the Workbook in-place