Hi,
Thank you for your inquiry.
I used the following code to test your scenario and encounter the similiar issue as you. Did you use the same code as me?
- Code: Select all
// Create a new Workbook object
Workbook workbook = new Workbook();
// Load the workbook from the specified file path
workbook.LoadFromFile(@"E:\\35012\\freeform not viewable after using CopyFrom\\freeform not viewable after using CopyFrom.xlsx");
// Get the first worksheet in the workbook
Worksheet sheet1 = workbook.Worksheets[0];
// Add a new worksheet to the workbook and name it "Copy"
Worksheet sheet2 = workbook.Worksheets.Add("Copy");
// Copy the content of sheet1 to sheet2
sheet2.CopyFrom(sheet1);
// Save the modified workbook to the specified output file path
workbook.SaveToFile(@"E:\\35012\\result.xlsx");
If not, please offer your full test code that can reproduce your issue to help us do further investigation, you can attach here or send it to us via email (
[email protected]). Thank you in advance.
Sincerely,
Ula
E-iceblue support team