'How do I clone existed complicated rows to the work sheet using openxml
Solution 1:[1]
Finally, I use EPplus instead of OpenXML, Just 2 lines to solve my problem.
private void AddRows(ExcelWorksheet sheet, int rowFrom, int colFrom, int rowTo, int colTo)
{
sheet.InsertRow(rowFrom,2);
sheet.Cells[28, 1, 29, 46].Copy(sheet.Cells[rowFrom, colFrom, rowTo, colTo]);
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Brad Huang |