Working with CelItems issue

Working with CelItems issue

Hello!
I try to use CelItems() function of Cel to create alternative CEL Export function (for example export to excel).
with code like
C# Code:
public void Macro_ExportCelToCsv()
{
try
{
SaveFileDialog saveFileDialog = new SaveFileDialog();
if (saveFileDialog.ShowDialog() == DialogResult.OK)
{
Trace.WriteLine("Count = " + this.Cel().CelItems("*").Count);
int count = this.Cel().CelItems("*").Count;
using (StreamWriter sw = new StreamWriter(saveFileDialog.FileName))
{
for (int i = 0; i < count; i++)
{
sw.WriteLine(this.Cel().CelItems("*").Item(i).Class.ToString() + ";" +
this.Cel().CelItems("*").Item(i).Time.ToString() + ";" +
this.Cel().CelItems("*").Item(i).VariableName + ";" +
this.Cel().CelItems("*").Item(i).Tagname + ";" +
this.Cel().CelItems("*").Item(i).User + ";" +
this.Cel().CelItems("*").Item(i).Value.ToString());
}
}
}
}
catch (Exception ex)
{
Trace.WriteLine(ex.Message);
}
}

we get only todays lines of CEL in result report.
How to get CEL lines from preceding days?

This is a migrated post! Originally posted on 15.03.2012 by user stolyarov_as. Please be aware that information can be outdated.