Hi i have two datagrids on a page, and on the click of a button, i would like to export the datagrids to the same excel spreadsheet, however both have to be in seperate worksheets, how can i achieve this. Thanks
Yes, it is possible, but not out of the box. First of all, you should use the ExcelML format, as it is the only one that supports separate worksheets. And this is the trick: you should export both of the RadGridViews in separate MemoryStreams, read them as strings and then write the modified content in the FileStream opened for the exporting operation. You should achieve something like that in the end:
<Workbook . . . >
<Worksheet . . . >
<Table . . .>
Grid1 rows
</Table>
</Worksheet>
<Worksheet . . . >
<Table . . .>
Grid2 rows
</Table>
</Worksheet>
</Workbook>
Please, let us know in case you need any additional assistance on this.
Greetings,
Ivan Ivanov
the Telerik team
Time to cast your vote for Telerik! Tell DevPro Connections and Windows IT Pro why Telerik is your choice. Telerik is nominated in a total of 25 categories.