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. Image for the cookie policy date

Columns.Count property only reflects column with data in.

After opening a spreadsheet and checking the columns count property - it only reflected the last column which actually had data in.

Despite the fact that many additional columns where visible ie. ABCDEFGHIJK... etc.   if no data had been populated yet the columns.count only showed a value of 1.

Is this correct ? and does this mean in order to manipulate columns/cells on a clean spreadsheet I need to insert the additional columns before I can use them.   How do I tell what are actual columns as against what are being shown in the spreadsheet.

1 Reply

AA Arulraj A Syncfusion Team January 23, 2019 05:45 AM UTC

Hi Spotty, 

Thanks for using Syncfusion product. 

To get the visible columns count in Spreadsheet, you could use the ActiveGrid.ColumnCount property. Please refer the following code example. 

'Column count 
Dim colCount As Integer = Me.spreadsheet.ActiveGrid.ColumnCount 
'Row count 
Dim rowCount As Integer = Me.spreadsheet.ActiveGrid.RowCount 
Please get back to us if you require further assistance from us.   
Arulraj A 

Live Chat Icon For mobile
Up arrow icon