ggever
ggever

Reputation: 45

Can we Clone XLWorkbook Object(Using ClosedXml)

I'm using ClosedXml and Vb.net. I want to create clone XLWorkbook from existed XLWorkbook. But I have no idea. Can someone help me? Is there anything like bellow?

Dim original As XLWorkbook
Dim clone AS XLWorkbook
original = New XLWorkbook("filepath")
clone = original.Clone()

Thank you so much.

Upvotes: 0

Views: 691

Answers (1)

Raidri
Raidri

Reputation: 17550

No there is no Clone() method in ClosedXML. You have to save the Workbook (to a stream or file) and create a new Workbook from that copy.

Upvotes: 3

Related Questions