Spread Windows Forms 9.0 Product Documentation
NonEmptyItemFlag Enumeration
Example Example 


Specifies the type of contents of a cell.
Syntax
'Declaration
 
Public Enum NonEmptyItemFlag 
   Inherits System.Enum
'Usage
 
Dim instance As NonEmptyItemFlag
public enum NonEmptyItemFlag : System.Enum 
Members
MemberDescription
Data[1] Indicates that a cell contains data
Style[2] Indicates that a cell contains formatting information
Example
int i, j;
fpSpread1.Columns[2].CellType = new FarPoint.Win.Spread.CellType.DateTimeCellType();
for( i = 0; i < 10; i++ )
    fpSpread1.ActiveSheet.SetValue(i, 0, i + 1);
j = 0;
for( i = 106;  i > 96; i-- )
{
    fpSpread1.ActiveSheet.SetValue(j, 1, Convert.ToChar(i));
    j += 1;
}
System.DateTime mydate = System.DateTime.Now;
for( i = 0; i < 10; i++ )
    fpSpread1.ActiveSheet.SetValue(i, 2, mydate.AddDays(i));
label1.Text = "The last non-empty column and row is: Column( " + fpSpread1.ActiveSheet.GetLastNonEmptyColumn(FarPoint.Win.Spread.NonEmptyItemFlag.Data).ToString()
+ ") - Row(" + fpSpread1.ActiveSheet.GetLastNonEmptyRow(FarPoint.Win.Spread.NonEmptyItemFlag.Data).ToString() + ")";
Dim i As Integer, j As Integer
FpSpread1.ActiveSheet.Columns(2).CellType = New FarPoint.Win.Spread.CellType.DateTimeCellType()
For i = 0 To 9
    FpSpread1.ActiveSheet.SetValue(i, 0, i + 1)
Next
j = 0
For i = 106 To 97 Step -1
    FpSpread1.ActiveSheet.SetValue(j, 1, Convert.ToChar(i))
    j += 1
Next
Dim mydate As DateTime = Now
For i = 0 To 9
    FpSpread1.ActiveSheet.SetValue(i, 2, mydate.AddDays(i))
Next
Label1.Text = "The last non-empty column and row is: Column( " & FpSpread1.ActiveSheet.GetLastNonEmptyColumn(FarPoint.Win.Spread.NonEmptyItemFlag.Data).ToString()
& ") - Row(" & FpSpread1.ActiveSheet.GetLastNonEmptyRow(FarPoint.Win.Spread.NonEmptyItemFlag.Data).ToString() & ")"
Inheritance Hierarchy

System.Object
   System.ValueType
      System.Enum
         FarPoint.Win.Spread.NonEmptyItemFlag

Requirements

Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows Server 2012 R2, Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8, Windows 8.1, Windows 10

See Also

Reference

FarPoint.Win.Spread Namespace
GetLastNonEmptyColumn Method (SheetView Class)
GetLastNonEmptyRow Method (SheetView Class)
NonEmptyColumnCount Property (SheetView Class)
NonEmptyRowCount Property (SheetView Class)
INonEmptyCells Interface

User-Task Documentation

Finding Rows or Columns That Have Data

 

 


Copyright © GrapeCity, inc. All rights reserved.