Work with template

Hi,

I would like to work with template.
I have a template which define the style of each cells, can I work with it ?
Can I copy data into this template and keep the style of the cells ?

If I use the following code, I change the style, do you know How can I do ?

PasteOptions option = new PasteOptions();
option.PasteType = PasteType.Values;
option.SkipBlanks = true;

////Copy data in the template file
targetRange.Copy(sourceRange, option);

I don’t want to modify the style in the template.

Best regards

Hi,

Please test with the latest version/fix: Aspose.Cells for .NET v7.0.2.7


If you still find the issue, could you give us template file and mention which portion of data you are copying to which portion of range (retaining its formatting).

Also, see the topic: