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

Exporting to Xls with a xls file model

1 Answer 50 Views
GridView
This is a migrated thread and some comments may be shown as answers.
segolene
Top achievements
Rank 1
segolene asked on 18 Oct 2016, 02:27 PM

Hi!

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

1 Answer, 1 is accepted

Sort by
0
Dilyan Traykov
Telerik team
answered on 20 Oct 2016, 01:39 PM
Hello ,

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.

Regards,
Dilyan Traykov
Telerik by Progress
Do you need help with upgrading your WPF project? Try the Telerik API Analyzer and share your thoughts!
Tags
GridView
Asked by
segolene
Top achievements
Rank 1
Answers by
Dilyan Traykov
Telerik team
Share this question
or