We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Insert Row and copy Format and Formula in XLSIO

Thread ID:





100717 Aug 29,2011 02:45 PM UTC Sep 2,2011 11:37 AM UTC WinForms 1
Tags: XlsIO
Nguyen Duy Hung
Asked On August 29, 2011 02:45 PM UTC

I have write to function perform insert Row:

Sub InsertRow()
Dim Rng, n As Long, k As Long
Application.ScreenUpdating = False
Rng = InputBox("Enter number of rows required.")
If Rng = "" Then Exit Sub
Range(ActiveCell, ActiveCell.Offset(Val(Rng) - 1, 0)).EntireRow.Insert
'need To know how many formulas To copy down.
'Assumesfrom A over To last entry In row.
k = ActiveCell.Offset(-1, 0).Row
n = Cells(k, 256).End(xlToLeft).Column
Range(Cells(k, 1), Cells(k + Val(Rng), n)).FillDown
End Sub

But when I want change to XLSIO then I can't find method ActiveCell

Help me

Lokesh R [Syncfusion]
Replied On September 2, 2011 11:37 AM UTC

Hi Hung,

Thank you very much for your interest on Syncfusion products.

Yes, In XlsIO we have property to get the active cell in the active window (the window on top) or in the specified window. Please make use of the below code snippet and let us know if this helps you. Also we have provided the online documentation link for the same.


ExcelEngine engine = new ExcelEngine())
IApplication app = engine.Excel;
IWorkbook book = app.Workbooks.Open(@"../../Data.xlsx");

Online documentation link:


Please let us know if you need any clarifications.



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon