I am using the below logic to apply the formatting of the first row to next row.
CellArea area = CellArea.CreateCellArea(col1, col2);//B1-B7
xlwkst.getCells().insertRange(area, 1, ShiftType.Down);
I need only the formatting to be copied to next row however using the above logic, it is adding the borders also.
Attached is the template file which i use to create the report.
7th row columns in the sheet are formatted based on the currency type.
When populated the details in the 7th row, i need to copy the formatting to the next row without any borders as i am handling the borders manually based on the grouping of the records.
Below is the method i used to create the formatting to next row.
CellArea area = CellArea.CreateCellArea(col1, col2);
xlwkst.Cells.InsertRange(area,1 , ShiftType.Down);
xlclose();
}
When the above code executes, as per my previous post, it is creating a new 8th row with formatting as well as borders.
I cannot able to provide the runnable code as it will take some time to create a demo project. Could you please suggest asap. ThanksEISMR1Init.zip (20.5 KB)
I did test your scenario/case using your template file with Aspose.Cells APIs and found the issue as you talked about. But when I do the same thing manually in MS Excel, it works the same way. I opened your Excel file into MS Excel manually. Then, I selected the range, i.e., “B7:H7” and click “Copy” of right-click menu. Then, I select B8 and click “Insert Copied Cells…” of the context menu. I noticed the borders are also copied to the range “B8:H8”. To remove the borders of the cells (B8:H8) I have to manually off for the range of cells. So, apparently, Aspose.Cells works the same way as MS Excel does.
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.