28 Answers, 1 is accepted
Thank you for your question. ExportToExcelML class does not support directly opening the result file. However, you can easily implement similar functionality through Process.Start method. Please, consider the following code:
ExportToExcelML exporter =
new
ExportToExcelML(
this
.radGridView1);
exporter.RunExport(@
"C:\Test.xls"
);
System.Diagnostics.Process.Start(@
"C:\Test.xls"
);
Do not hesitate to contact me again if you have any other questions.
Best wishes,
Martin Vasilev
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
I have the same problem.
This solution is not good enough. because you can't open another file if this file is still opened.
And i don't want to random a file name and save lots of files in the user computer.
I will be happy to have a solution that take the memory stream of the Radgrid and open it in excel without saving it.
thanks.
Thank you for writing.
There is no mechanism to overwrite the information in an opened file in Windows. What you can do is close the opened MS Excel and reopen it with the new information. Here is a sample code which demonstrates this:
Process excel;
private
void
radButtonExcelML_Click(
object
sender, EventArgs e)
{
Process[] processes = Process.GetProcessesByName(
"EXCEL"
);
if
(processes.Length > 0)
{
this
.excel = processes[0];
}
if
(
this
.excel !=
null
&& !
this
.excel.HasExited)
{
this
.excel.CloseMainWindow();
}
ExportToExcelML exporter =
new
ExportToExcelML(
this
.radGridView1);
string
filePath = @
"C:\grid.xls"
;
if
(
this
.excel !=
null
)
{
bool
fileReleased =
false
;
while
(!fileReleased)
{
try
{
File.Delete(filePath);
fileReleased =
true
;
}
catch
(IOException)
{ }
}
}
exporter.RunExport(filePath);
this
.excel = Process.Start(filePath);
}
I hope this will help. If you have further questions, I would be glad to assist.
All the best,
Ivan Petrov
the Telerik team
SP1 of Q3’11 of RadControls for WinForms is available for download (see what's new).
I fixed the license as you asked.
well i think you misunderstand me.
When we use the ms grid we made our own excel export. what we offer to the user is 2 things.
1. Save to excel file.( opening the save dialog ...... Telerik Export to excel is very good for this )
2. Show grid in excel.( opening immediately the excel with all the grid rows data.. ).
In the second case we did not create file but we open for the user an excel sheet with no name ( as well as you open a new excel ).
the user can close it without saving or close and save as he wish. i don't want to create any file at all.
Thanks.
Ofer
IS THERE ANY BODY GOING TO LISTEN TO MY QUESTION?
Ofer.
Thank you for your reply.
First of all let me explain how our support system works. Forum posts are handled within 72 hours and support tickets are handled according to your license agreement.
As to your question, currently our export to Excel feature can export only a newly created file. However, your suggestion makes sense and I added it as a feature request to our issue tracking system. You can track its progress by following this link.
If you need further assistance, I would be glad to help.
Kind regards,
Ivan Petrov
the Telerik team
SP1 of Q3’11 of RadControls for WinForms is available for download (see what's new).
OK, Thanks.
Can you please explain how to save more than one RadGrid in separated sheets at the same new excel file?.
Thanks.
Thank you for your reply.
I will try to explain the situation better. Currently, the export to Excel functionality can only export one RadGridView by creating a new Excel file and spreading RadGridView over one or more sheets. There is no way of exporting a RadGridView into an existing file, nor exporting a RadGridView into a separate sheet.
I hope I have made myself clearer. If you have other questions feel free to write back.
All the best,
Ivan Petrov
the Telerik team
SP1 of Q3’11 of RadControls for WinForms is available for download (see what's new).
I'm currently refactoring some screens that use the vanilla winforms gridview to Telerik use RadGridView as we needed the grouping features and other stuff and we purchased the Ultimate edition but mainly it was for WPF.
This is an oversight as our current usercontrol exports to excel without having to create a file, I guess you have built a bunch of export classes in TelerikData for each type, I've seen other controls like TxTextControl work like this and it's frustrating.
Essentially now I have to have a temp directory and create a unique filename each time I export as the filename could be open. When I close the screen I have to cleanup the temp files. It's extra work and in this instance RadGridView has added a lot of extra work which is a shame, gets a thumbs down from the dev team but the grid control itself is excellent, just the export is an after thought.
Thank you for your feedback.
I will add your vote for this request as well. Once it gathers considerable amount of votes, we will consider the possibilities for implementing such a feature and we will increase its priority amongst the other features/tasks.
Regards,
Julian Benkov
the Telerik team
I am really superise from your design team for leaving out such a essential function.
Thank you for your feedback.
Feel free to add your vote for this feature request at this link: http://www.telerik.com/support/pits.aspx#/details/Issue=9426.
Regards,
Julian Benkov
the Telerik team
referring to view excel file without saving :
"...As to your question, currently our export to Excel feature can export only a newly created file. However, your suggestion makes sense and I added it as a feature request to our issue tracking system. You can track its progress by following this link. "
Has this solution been added. ? I cannot find any explanation on this in documentation.
The link you mentioned here above doesn't work to find the answer.
I'm now testing UI for winforms last version 2014 Q1.
Regards
This feature is not yet implemented. We are currently working on libraries allowing for handling such documents, and once done, we will improve the controls export functionality as well. Here is a link to the items in our new feedback portal (the previous system was migrated there), where you can track its status: http://feedback.telerik.com/Project/154/Feedback/Details/110527.
I hope that you find this information useful.
Regards,
Stefan
Telerik
This question was originally brought up in 2010 and I was wondering if this has been implemented yet. I am referring to the ability to open in excel instead of prompting to save in regards to exporting a grid?
Thank you.
Yes, this feature is already implemented. On the case you can see its status is Completed and the release it was introduced: http://feedback.telerik.com/Project/154/Feedback/Details/110527-add-exporttoexcelml-add-possibility-to-export-a-radgridview-to-a-separate-work
For information how to use this functionality, see the FIleExportMode property here: http://docs.telerik.com/devtools/winforms/gridview/exporting-data/spread-export#properties
I hope this helps.
Regards,
Stefan
Telerik
Thanks for your response Stefan but I was not referring to a RadGridView. I was referring to the original question which states: "Is there anyway when exporting to have the file open in excel insted of prompting to save?".
Currently when you export to excel you only have an option to save the file. There is no option to OPEN or Save. Is there any way to make the export give an option of whether to OPEN in Excel or Save? Open in excel meaning to just open the file without saving it.
Thank you.
-Fro
This thread is in the RadGridView forum section, it concerns RadGridView related questions. If I understand correctly, you are using RadSpreadProcessing and if so, the proper forums would be: http://www.telerik.com/forums/winforms/spreadprocessing. All forum sections can be found here: http://www.telerik.com/community/forums/winforms.aspx
Meanwhile, to open a saved file, you can use the Process.Start() API. If this is not what you need, please provide detailed information on what you use and what you need to achieve.
Regards,
Stefan
Telerik
Hi
Is ther any news?
We realy need a way to export grid to excel.( opening immediately the excel with all the data in it, with no save nevigator) we dont want to create a file but we want to open an excel sheet with no name ( as well as you open a new excel ). the user can close it without saving or close and save as he wish. i don't want to create any file at all. The user just want to see the grid in excel and to manipulate on it and to close without saving.
SHORTLY
NO FILE SAVE NEVIGATOR. DO NOT CREAT A FILE AT ALL. JUST OPEN AN EXCEL SHEET WITH THE DATA GRID.
IT IS A VERY OLD ASK . PLEASE YOUR HELP.
Thanks.
Ofer
Thank you for writing.
In our 2016.2.608 release, we introduced support for exporting to a stream instead of writing a file on the system. Please check the following section of this documentation article: Spread Export. Once you have the stream it is up to you to decide how you want to process that stream.
I hope this helps. Should you have further questions please do not hesitate to write back.
Regards,
Hristo Merdjanov
Telerik by Progress
Hi Team,
#Kendo Grid
I am looking for similar requirement. In My case open excel functionality is required for Kendo Grid export.
I am using Kendo Grid in my application and when I am doing Export to Excel, Open excel option is not there only Save and Cancel are available.checked in both IE11 and Chrome.
As per my observation, Open file option is not coming for Excel,PDF,CSV files.
Any reply on this post is highly appreciated as this is critical requirement for me.
Please note that the thread discusses the RadGridView control for WinForms. Since you are using the Kendo grid please post your question in the proper forum: https://www.telerik.com/forums/kendo-ui. This way your question will reach the people who can help you best.
Regards,
Hristo
Progress Telerik
Hi Hristo,
Thanks for the fast response. I have tried in the forum link given by you. Its only for users with active subscription.
I cant get the subscription on the immediate basis. Is there any other way round to get the clarification on my query.
Please help!!!
You can also post your question in the "Kendo UI" category in StackOverflow: https://stackoverflow.com/search?q=kendoui.
Regards,
Hristo
Progress Telerik
Hi Hristo,
Thank you so much for your guidance. Have posted the query in relevant forum.
Thanks once again.
Lavanya.
Hi,
meanwhile I hit the same "issue" and tried to get Excel started directly with the data.
No idea Excel can display the generated data from the Grid without having a real file (xlsx) behind.
Workaround? Write a temporary file and open it ..
But Windows has not the option to unlink files (as in Unix) just after creation.
//Stefan
RadGridView offers several ways of exporting its content to Excel format. I would recommend using the GridViewSpreadExport utilizes our RadSpreadProcessing library to export the content of RadGridView to xlsx, csv, pdf and txt formats:
https://docs.telerik.com/devtools/winforms/controls/gridview/exporting-data/spread-export
However, it is necessary to export the content to a file (.xlsx) and then open this file in Excel. Usually, Process.Start(fileName) will do the job. If you don't need the file later, you are free to delete it from the FileExplorer.
An alternative approach is to use exporting to a memory stream:
https://docs.telerik.com/devtools/winforms/controls/gridview/exporting-data/spread-export#running-export-synchronously-using-a-stream
Then, it is up to you how you want to process that stream.
I hope this information helps. If you need any further assistance please don't hesitate to contact me.
Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik
Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.