I'm using Excel_Library (ODC) to handle uploaded Excel files. I have a situation where I upload a file with a single worksheet template. My goal is to duplicate this worksheet within the same Excel file based on specific input data. However, Excel_Library (ODC) doesn't have a direct feature for this task.
When I tried Worksheet_Add, it only creates a blank sheet without any option to replicate the formatting, styles, or data from the original template worksheet. I also used Cell_Copy(), which works well for copying cells within the same worksheet with their formatting, but it doesn't allow copying between different worksheets.
You're right — Excel_Library (ODC) doesn’t currently support duplicating entire worksheets, including formatting and content. While Cell_Copy() helps within the same sheet, it doesn't work across sheets. You might try manually recreating the sheet by adding a new worksheet and looping through each cell in the template to copy its value and format — though this can be complex and limited.
Also, I'm not entirely sure if there's an easier workaround, but maybe someone else in the community has done this differently.