Exporting to Xls with a xls file model

2 posts, 0 answers
  1. segolene
    segolene avatar
    3 posts
    Member since:
    Sep 2016

    Posted 18 Oct 2016 Link to this post


    My export is good but I have a model xls file and  I would like to begin my export starting from my ligne 7 of my model file.

    Also I would like to know if I can recover some information with my radGridView. 

    I have a problem with my first line is move automatically, it's not the good position, what can I do ?

    Thanks for answering

  2. Dilyan Traykov
    Dilyan Traykov avatar
    1193 posts

    Posted 20 Oct 2016 Link to this post

    Hello segolene,

    What you could do in this scenario is to open your excel file, load its active worksheet using the RadSpreadProcessing library, use RadGridView's ExportToWorkbook method and merge the two files using RadSpreadProcessing's Copy & Paste functionality, similarly to:

    Workbook currentWorkbook = gridView.ExportToWorkbook();
    var range = currentWorkbook.ActiveWorksheet.UsedCellRange;
    var fragment = currentWorkbook.ActiveWorksheet.Cells[range].Copy();
    PasteOptions valuesAndFormatting = new PasteOptions(PasteType.All);
    worksheet.Cells[worksheet.UsedCellRange.RowCount + 1, 0].Paste(fragment, valuesAndFormatting);

    Additionally, the issue you're referring to regarding the misaligned column groups was fixed with the 
    2016.2.627 internal build. Could you please try updating to the latest release of the controls (R3 2016) and let me know if it solves this?

    I hope you find this helpful. Do let me know if you need any further assistance on the matter.

    Dilyan Traykov
    Telerik by Progress
    Do you need help with upgrading your WPF project? Try the Telerik API Analyzer and share your thoughts!
Back to Top