Hi,
i want to know about Get Excel Value Event. please provide the explanation with example.
Thanks in advance....!:
:brick:
What is the Use of Get Excel Value Event???
-
- Posts: 85
- Joined: Sat Jan 20, 2007 4:21 am
What is the Use of Get Excel Value Event???
An ExcelValue property of the StiText component is used for the Excel export of the numbers with formating them as "numbers" in the resulted Excel file.
A GetExcelValueEvent is used with the same sense. But you may provide different values for the same component in this event.
Please see the example of the EventHandler for the GetExcelValueEvent of the Text1 component.
The result of the assignment to the e.Value you will see in the resulted Excel file after exporting of the rendered report. The resulted Excel file will be as following:
MyTextFromText1
200
200
...
200
Each cell will be formatted as number. If converting to number is impossible, than value of the StiText.Text will be transfered with formatting as text instead.
Thank you.
A GetExcelValueEvent is used with the same sense. But you may provide different values for the same component in this event.
Please see the example of the EventHandler for the GetExcelValueEvent of the Text1 component.
Code: Select all
public void Text1_GetExcelValue(object sender, Stimulsoft.Report.Events.StiGetExcelValueEventArgs e)
{
if (Line == 1)
{
e.Value = "MyText";
}
else
{
e.Value = "200";
};
}
MyTextFromText1
200
200
...
200
Each cell will be formatted as number. If converting to number is impossible, than value of the StiText.Text will be transfered with formatting as text instead.
Thank you.