C1.Win.C1FlexGrid Namespace > C1FlexGridBase Class > LoadGrid Method : LoadGrid(String,FileFormatEnum,FileFlags,Encoding) Method |
'Declaration
Public Overloads Sub LoadGrid( _ ByVal fileName As String, _ ByVal format As FileFormatEnum, _ ByVal flags As FileFlags, _ ByVal encoding As Encoding _ )
'Usage
Dim instance As C1FlexGridBase Dim fileName As String Dim format As FileFormatEnum Dim flags As FileFlags Dim encoding As Encoding instance.LoadGrid(fileName, format, flags, encoding)
This method loads grid from a file previously saved with the SaveGrid(String,FileFormatEnum,FileFlags,Encoding) method. Formats supported include comma-delimited text files (CSV format), tab-delimited text files, and Microsoft Excel files (.XLS).
When loading text files, rows and columns are added to the grid if needed to accommodate the file contents. Text files contain only data and no formatting information.
When loading Excel files, the grid retrieves the first worksheet from the specified workbook file. The LoadExcel(String,String,FileFlags) method allows you to specify which worksheet should be loaded. You can use the LoadExcelSheetNames method allows you to retrieve a list of the worksheets stored in an XLS file. The grid can save and load data and formatting information from XLS files.
Grids can also be persisted to Xml format using the WriteXml(String) and ReadXml(String) methods.
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2