radgrid problem export to csv

14 posts, 1 answers
  1. Laila
    Laila avatar
    2 posts
    Member since:
    May 2012

    Posted 23 May 2012 Link to this post

    Hi,
    I want to export in csv and pdf  but i  had a many problems .
    I use the same code as:
     http://www.telerik.com/help/winforms/gridview-exporting-data-export-to-csv.html 
    http://www.telerik.com/help/winforms/gridview-exporting-data-export-to-pdf.html 

    for export in csv I got an error   "Entry Point Not Found"

    for export to pdf I got the error    "Unable to cast object of type'Telerik.WinControls.UI.GroupPanelElement' to type 'Telerik.WinControls.RadElement'." 

    Thanks
  2. Answer
    Berrabah
    Berrabah avatar
    37 posts
    Member since:
    Feb 2012

    Posted 24 May 2012 Link to this post

    Hi Laila,
    I have the same problem befor (Entry Poitn Not Found) and I have solved it by updating the Winform Telerik Control,
    Try it and tell me if Ok

    Thank you 
    Amine
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Laila
    Laila avatar
    2 posts
    Member since:
    May 2012

    Posted 26 May 2012 Link to this post

    Thanks for help,it works.
  5. Alan
    Alan avatar
    4 posts
    Member since:
    Mar 2012

    Posted 31 May 2012 Link to this post

    Hi,

    I am having exactly the same problem. My Winform Telerik Control is from March 2012 (which I assume is up-to-dated).
    Here's my code:

            private void Export_Click(object sender, EventArgs e)
            {
                var exporter = new ExportToCSV(myGridView);
                var fileName = "C:\\Exporter.csv";
                exporter.RunExport(fileName);            
            }

    Any idea?

    Thanks.
  6. Alan
    Alan avatar
    4 posts
    Member since:
    Mar 2012

    Posted 31 May 2012 Link to this post

    I re-added the TelerikData dll and it seems to be working now.

    Thanks.
  7. Ivan Petrov
    Admin
    Ivan Petrov avatar
    701 posts

    Posted 05 Jun 2012 Link to this post

    Hi all,

    Thank you for writing.

    I am glad you have been able to find your way through this problem. The TelerikData dll is needed for all types of export that RadGridView currently supports. Also, you have to make sure you are using assemblies with the same version, otherwise issues might occur.

    If you have further questions, feel free to write back.

    Greetings,
    Ivan Petrov
    the Telerik team
    RadControls for WinForms Q1'12 release is now live! Check out what's new or download a free trial >>
  8. Alan
    Alan avatar
    4 posts
    Member since:
    Mar 2012

    Posted 05 Jun 2012 Link to this post

    Hi,

    Does ExportToExcelML support .xlsx format? I am having problem opening the file after exporting, here's the error message:

    "Excel cannot open the file 'myFile.xlsx' because the file format or file extension is not valid. Verify that the file has not been corrupted and that the file extension matches the format of the file."

    Thanks.
  9. Ivan Petrov
    Admin
    Ivan Petrov avatar
    701 posts

    Posted 07 Jun 2012 Link to this post

    Hello Alan,

    Thank you for writing back.

    The ExportToExcelML exports data in the Excel XML format. This is an XML based format that cannot be saved with xlsx file extension. The proper extension for a file with data structured in this format is xml. Our exporter takes advantage of the fact that Excel can open certain files which do not have matching internal format and file extension. This is why you get a message when you open the exported excel file when it is with xls extension. We consider that file with an xml extension might be confusing to the users and the message is the price to pay for an easily recognizable file extension that is xls. 

    I hope this will be informative. If you have further questions, feel free to write back.

    Greetings,
    Ivan Petrov
    the Telerik team
    RadControls for WinForms Q1'12 release is now live! Check out what's new or download a free trial >>
  10. Alan
    Alan avatar
    4 posts
    Member since:
    Mar 2012

    Posted 07 Jun 2012 Link to this post

    Hi Ivan,

    Thanks for your reply. I can work with xls format for now and that's not a problem. 
    Just out of my own interest, since xlsx format is becoming more common now, would xlsx extension be supported any time soon?

    Thanks.
  11. Ivan Petrov
    Admin
    Ivan Petrov avatar
    701 posts

    Posted 12 Jun 2012 Link to this post

    Hi Alan,

    Thank you for your reply.

    I guess I have not explained the situation clearly with my last post. The ExportToExcelML exports the data from RadGridView in Excel XML format. Files which contain data in this file format should have .xml extension. On the other hand we consider .xml might be confusing for end-users as they do not associate xml with Excel. We use xls file extension just because users recognize it and associate it with Excel and because Excel can open such a file. By such a file I mean a file that has a "wrong" file extension that does not correspond to the internal file format. This does not apply to the xslx file extension, Excel cannot open a file with Excel XML file format and xlsx file extension. As a result if we are to support xlsx extension, we will have to implement an exporter that would export data in xlsx file format and this currently we do not have a time frame specified about that. Of course, if there are many users who want this feature, we will increase its priority in our development plans.

    I hope this makes things clearer. Do not hesitate to write back with any further questions.

    Kind regards,
    Ivan Petrov
    the Telerik team
    RadControls for WinForms Q1'12 release is now live! Check out what's new or download a free trial >>
  12. ByrdMan
    ByrdMan avatar
    9 posts
    Member since:
    Mar 2007

    Posted 25 Oct 2012 Link to this post

    Just ran into this problem and with this answer posted, I was able to correct the exception.  But a bit further, there are 2 .NET versions of the assembly.  I initially loaded the v2.0 assembly into my 4.0 project.  But then discovered (after reading this post) there is a Bin40 folder with the .NET v4.0 assemblies.  That's what I reloaded and it was all good.  So remember which version of .NET your app runs with!!
  13. Robert
    Robert avatar
    7 posts
    Member since:
    Jun 2012

    Posted 12 Nov 2012 Link to this post

    Thanks ByrdMan. That was exactly the problem I was having.
  14. Vikash
    Vikash avatar
    1 posts
    Member since:
    Jan 2014

    Posted 25 Mar 2014 Link to this post

    Hi Ivan,
    Your information is quite helpful. I am using Rad Grid on my reports. I am using EXCELML format to export Excel.
    Whenever my clients open excel file, they got message as you already stated. but this message is making quite a bad impression on my clients. so my first question is how can i remove this message?
    for the time being i have replaced the EXCELML format with Biff format.to exporting excel. But in Biff format it is changing date time format in "Long date format of Excel". I tried to overcome this problem with placing datastringformat (DataFormatString="{0:MM/dd/yyyy hh:mm:ss tt}") to my datetime column. but this is showing "tt" on excel in place of AM/PM. plz see attached file for this.
    Can you help me in this reference ?



  15. Ivan Petrov
    Admin
    Ivan Petrov avatar
    701 posts

    Posted 27 Mar 2014 Link to this post

    Hi Vikash,

    Thank you for writing.

    The reason you get "tt" instead of "am/pm" in Excel is the fact that Excel has its own format codes. To get the "am/pm" to show you have to replace the "tt" part of your format string with "AM/PM":
    "yyyy.MMMM.dd hh:mm:ss AM/PM"

    You can read more on that in our online documentation in the article on Export to ExcelML section Format Codes.

    I hope this will be useful. Feel free to write back with further questions.
     
    Regards,
    Ivan Petrov
    Telerik
     

    Build cross-platform mobile apps using Visual Studio and .NET. Register for the online webinar on 03/27/2014, 11:00AM US ET.. Seats are limited.

     
Back to Top
UI for WinForms is Visual Studio 2017 Ready