Yes. You can copy the forms element to a new worksheet.
Following is the sample code:
Excel excel = new Excel(); excel.Open("d:\\test\\book1.xls"); excel.Worksheets.AddCopy(0); //copy the first worksheet which contains forms elements excel.Save("d:\\test\\book2.xls");
Thank you very much for your reply. I forgot to mention why I would like to copy these elements Its because the worksheet is write protected, and these cant be opened on a PDA. (Pocket Office). So I want to create a fresh copy of the worksheet. The Copy Worksheet method will also copy this write protection. So im using the copy cells or copy row-column, but then I need to copy the form.checkboxes manually.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.