This is a migrated thread and some comments may be shown as answers.

Export to Excel - Data Extract utility

1 Answer 93 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Owen
Top achievements
Rank 1
Owen asked on 12 Dec 2011, 07:15 PM
Hello,
What we are doing i,s we have a set of different data extracts we want to do into excel.

We have a radcombobox that contains the list of these different data extracts.

We choose one from the list and click on Extract data button and we populate a hidden datagrid and then export to excel from there.
It prompts if we want to open the file or save.
We choose to open the file check the data and we close the excel file. Select another item from the combobox and repeat the steps.
It all works fine.

But when we do not close the open file and choose another item from the combobox and then export to excel, the whole thing freezes.

I guess because the excel is already open.

Is there any way out of this.
i.e. can we continue doing exctracts without having to close the previous excel?

Also, We want to be able to select multiple items from the combox and do the extract at the same click.
Is there any easier way to do it?

Thanks.
 

1 Answer, 1 is accepted

Sort by
0
Andrey
Telerik team
answered on 15 Dec 2011, 05:39 PM
Hello Owen,

Thank you for contacting us.

Yes, you are perfectly right that the reason for the hanging Excel application is that you are trying to rewrite already opened file and the operating system is not allowing you to do that.

The only way you could continue exporting without closing the current file is to give different name for the file each time the button has been clicked. Thus you won't have such problem.

About your other question, if I understand you correctly you are using RadComboBox to filter data and you want to show it in RadGrid instance. You could achieve the required behavior by using custom filter expression. Every time the user choose an item from the RadComboBox you will modify the filter expression, when the user press the Extract data button the expression will be applied and all data that was selected will be exported.

You could check this help topic for more information about RadGrid filter expressions.

I hope the provided information helps. Let me know if I can assist you further.

Regards,
Andrey
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Tags
Grid
Asked by
Owen
Top achievements
Rank 1
Answers by
Andrey
Telerik team
Share this question
or