Posts

Showing posts from February, 2012

Find Excel Workbook available sheet name using asp.net c#

hi friends, today morning i find one issues to find available sheet in Excel workbook.. so here is solution for this. first of all we has to upload that file to server [excel] folder and then read excel sheet with oledb provider. 1. create aspx page with having two controls      File upload controls with name [flUpldExcel]      One command button to perform action.  than once we save excel sheet to server so next step is to find available sheet in work book. Now want to find available sheets on workbook. for that i write code that will find all sheets. Code for saving file on server  try         {             string strFilePath = Server.MapPath("excel") + @"\";             string strFileName = string.Empty;             if (flUpldExcel.HasFile)             {                 strFileName = flUpldExcel.PostedFile.FileName;                 flUpldExcel.SaveAs(strFilePath + strFileName);                 string[] strSheetName;                 strSheetName = GetEx