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

Spreadsheet - convert workbook to stream

3 Answers 600 Views
SpreadProcessing
This is a migrated thread and some comments may be shown as answers.
Mahesh
Top achievements
Rank 1
Mahesh asked on 31 Jan 2018, 04:44 AM
Can we convert workbook to a stream and return the stream?

3 Answers, 1 is accepted

Sort by
0
Petya
Telerik team
answered on 31 Jan 2018, 01:46 PM
Hello Mahesh,

Could you please elaborate which product you are using exactly? We provide Spreadsheet controls/widgets as part of several of our suites, both for web and desktop development. In order to provide you with the most appropriate information that will help achieve your requirement, I'd appreciate some additional details about your setup.

Regards,
Petya
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Mahesh
Top achievements
Rank 1
answered on 31 Jan 2018, 03:12 PM

Hi petya,

 

Thanks for your reply.

We are using RadSpreadProcessing library for exporting data to Excel.

In the below link it is mentioned on how to write to workbook and export it.

Iam looking to save the workbook to a MemoryStream and return it instead of exporting the workbook; something like WorkBook.Save(stream) which should save all the workbook data to 'stream'. Do we have any option like this?

 

 

0
Petya
Telerik team
answered on 01 Feb 2018, 04:16 PM
Hi Mahesh,

Thank you for the information, I'm moving this forum thread to the SpreadProcessing forum category. 

The process of exporting a workbook to XLSX format basically converts that object to a binary array. For convenience, the XlsxFormatProvider also has an overload of the Export() method which accepts a Stream object as a second parameter and writes the data in it - XlsxFormatProvider API Reference You can take a look at the example with a FileStream in this help article and adapt it to your exact needs.

I hope this helps.

Regards,
Petya
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
SpreadProcessing
Asked by
Mahesh
Top achievements
Rank 1
Answers by
Petya
Telerik team
Mahesh
Top achievements
Rank 1
Share this question
or