sduraiappan
Programmer
I am using this code in my Vb.Net application to add some empty rows in a worksheet:
Dim TPAGECOUNT = WKSHEET.PageSetup.Pages.Count
Do While TPAGECOUNT = WKSHEET.PageSetup.Pages.Count
Loop
This code works fine in system having Excel 2007 and the entire content is fit to one page.
If I run the same application in a system having Excel 2013, I find one extra row and hence the page count is increased by 1.
I could not locate the issue.
Can anyone please help me.
Regards,
S.Duraiappan.
Dim TPAGECOUNT = WKSHEET.PageSetup.Pages.Count
Do While TPAGECOUNT = WKSHEET.PageSetup.Pages.Count
WKSHEET.Range("A" & TROW & ":R" & TROW).Rows.Insert(Shift:=EXCEL.XlInsertShiftDirection.xlShiftDown)
TROW = TROW + 1
WKSHEET.PageSetup.PrintArea = "A1:" & TCOL & TROW + 10Loop
This code works fine in system having Excel 2007 and the entire content is fit to one page.
If I run the same application in a system having Excel 2013, I find one extra row and hence the page count is increased by 1.
I could not locate the issue.
Can anyone please help me.
Regards,
S.Duraiappan.