Page 1 of 1
Urgent question - StiExcelExportSettings in code behind
Posted: Wed Dec 18, 2013 1:07 pm
by jalal_logitude
I am trying to set
UseOnePageHeaderAndFooter = true
so each time, when user click on export to excel, this option will be checked by default.
I am using :
StiExcelExportSettings d = new StiExcelExportSettings();
d.UseOnePageHeaderAndFooter = true;
but it doesn't work.
How i should do that ??
Thanks
Jalal
Re: Urgent question - StiExcelExportSettings in code behind
Posted: Thu Dec 19, 2013 8:39 am
by Alex K.
Hello,
We couldn't reproduce this bug.
Please check the last prerelease build and let us know about the result.
Thank you.
Re: Urgent question - StiExcelExportSettings in code behind
Posted: Thu Dec 19, 2013 12:00 pm
by jalal_logitude
Hello,
it is not a bug.
I am just asking how i can set UseOnePageHeaderAndFooter = true from code behind ?
Thanks
Re: Urgent question - StiExcelExportSettings in code behind
Posted: Thu Dec 19, 2013 1:33 pm
by Alex K.
Hello,
Please try to use the following code:
Code: Select all
var sf = new System.Windows.Controls.SaveFileDialog();
if (sf.ShowDialog() == true)
{
var stream = sf.OpenFile();
var settings = new StiExcelExportSettings();
settings.UseOnePageHeaderAndFooter = true;
report.ExportDocument(StiExportFormat.Excel, stream, settings);
}
Re: Urgent question - StiExcelExportSettings in code behind
Posted: Thu Dec 19, 2013 1:52 pm
by jalal_logitude
Thanks Aleksey,
your code is ok and it works fine since i tried it before. But I don't want to use SaveFileDialog, i just want to use stimulsoft window that opens when press export to excel with UseOnePageHeaderAndFooter checked by default.
any way to do that ?
Jalal
Re: Urgent question - StiExcelExportSettings in code behind
Posted: Fri Dec 20, 2013 6:09 am
by HighAley
Hello.
In this case you could try to use next code:
Code: Select all
StiSettings.Set("StiExcelSetupForm", "UseOnePageHeaderAndFooter", false);
But it there will be any changes in our export forms this code may stop working.
Thank you.
Re: Urgent question - StiExcelExportSettings in code behind
Posted: Sun Dec 22, 2013 9:14 am
by jalal_logitude
Hello,
What you sent me doesn't work !
but the following code works fine :
StiSettings.Set("StiExcelExportSetupForm", "UseOnePageHeaderAndFooter", true);
Thanks
Jalal
Re: Urgent question - StiExcelExportSettings in code behind
Posted: Sun Dec 22, 2013 1:46 pm
by Andrew
Hello,
From your last post I understand the issue is closed, right?
Thank you.
Re: Urgent question - StiExcelExportSettings in code behind
Posted: Wed Jan 22, 2014 2:21 pm
by jalal_logitude
Yes, Thanks
Re: Urgent question - StiExcelExportSettings in code behind
Posted: Thu Jan 23, 2014 6:13 am
by Alex K.
Hello,
Let us know if you need any additional help.