[]
        
(Showing Draft Content)

C1.Excel.C1XLBook.Progress

Progress Event

Fired while data is being read from or written into a workbook.

Namespace: C1.Excel
Assembly: C1.Excel.dll
Syntax
public event XLProgressEventHandler Progress
Returns
Type Description
XLProgressEventHandler Fired while data is being read from or written into a workbook.
Remarks

This event is typically used to update the application UI during lengthy operations. It can also be used to cancel the operations.

Examples

The code below writes messages to the output window while the application Excel files.

void Load()
{
	// create workbook
	C1XLBook book = new C1XLBook();

	// progress event handler
	book.Progress += new XLProgressEventHandler(load_Progress);

	// load workbook
	book.Load(xlFileName);
}

// print messages while workbook are loaded
void load_Progress(object sender, XLProgressEventArgs e)
{
	Console.WriteLine("Loading {0}, {1:p0} done",
		e.FileName, e.Position/(float)e.FileLength);
}