C1.Win.C1FlexGrid Namespace > C1FlexGridBase Class : LoadExcelSheetNames Method |
'Usage
Dim instance As C1FlexGridBase Dim fileName As String Dim value() As String value = instance.LoadExcelSheetNames(fileName)
public: array<String^>^ LoadExcelSheetNames( String^ fileName )
// clear tabControl tabControl.TabPages.Clear(); // load sheet names string fileName = "c:\book1.xls"; string[] sheets = _flexGrid.LoadExcelSheetNames(fileName); // load each sheet foreach (string sheetName in sheets) { // create a new grid for this sheet C1FlexGrid flex = new C1FlexGrid(); flex.Dock = DockStyle.Fill; // load sheet into new grid flex.LoadExcel(fileName, sheetName); // add grid to the tabControl TabPage page = new TabPage(); page.Controls.Add(flex); page.Text = sheetName; tabControl.TabPages.Add(page); }
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