Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
447
Could not load foramtted predefined Excel template using Infragistics.Excel
posted

I have a excel template with all the formatting predefined. All I want to do it load this template with appropriate values and save it.

When I load the excel template. it could not fine the active sheets. It says WorkSheets count as 0.

Here is the code that I use.

var excel_path = @"C:\\Test\\TEST.xlsx";

FileStream stream = File.OpenRead(excel_path);

Workbook wBook = Workbook.Load(stream);

Worksheet loSheet = wBook.Worksheets[0]; // here is where it is breaking.

I checked the wBook.Worksheets.Count and it says 0.

 

Am I missing anything? Please let me know...