How to get the size (width and height) of the area with excel vsto c#, excluding the ribbon area? This is the area shown with red marker below:
This code should work,
Dim ws As Excel.Worksheet = Globals.ThisAddIn.Application.ActiveSheet
Dim _with1 = ws.PageSetup
sngWidth = _with1.Application.Width
sngHeight = _with1.Application.Height
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.