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

Download Excel File on fly

3 Answers 323 Views
Spreadsheet
This is a migrated thread and some comments may be shown as answers.
Anupkumar
Top achievements
Rank 1
Anupkumar asked on 13 Sep 2017, 12:30 PM

HI,

 

1. How to download file in XLSX format directly without saving on local path or server without UI  using radspread processing ?

2. How to download file in XLSX format directly without saving on local path or server with UI  using radspread processing ?

 

Please provide complete demo or documentation on this because I am using console application .

3 Answers, 1 is accepted

Sort by
0
Tanya
Telerik team
answered on 15 Sep 2017, 08:12 AM
Hi Anupkumar,

I am not sure I properly understand the scenario you would like to implement, thus I would like to ask you several questions about it.

1. Downloading a file assumes that the file will be saved somewhere on the client. What is the end goal you need to achieve? Where does the file come from? How would you like to preserve it? In case you would like to obtain the file and import it in RadSpreadProcessing, you could pass its data as byte[] or stream to the Import() method of XlsxFormatProvider

2. The console applications don't natively provide a UI. If we have more information about the scenario and the desired end goal here, we could suggest you an approach to achieve it. Could you please elaborate more?

Regards,
Tanya
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Anupkumar
Top achievements
Rank 1
answered on 15 Sep 2017, 01:27 PM

Hi,

I am able to save the file at a physical path (provide by me) on my local machine from server side. Now I want to send  that file on client side and want to download it from browser. I tried to send that file as byte array to the client and was able to download it using blob. But the problem is its not able to write the content of byte data in xlsx format when I am opening the file.

0
Tanya
Telerik team
answered on 19 Sep 2017, 12:14 PM
Hi Anupkumar,

If I properly understand, your requirement is to download the document on the client. Please, correct me if I am wrong. A sample implementation of this scenario is demonstrated in our online examples and more specifically, the Download_Document() method of the controller in the Basic Usage demo. In short, you should set the mime type of the file and its extension so it can be recognized as an XLSX document.

Hope this is helpful.

Regards,
Tanya
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Spreadsheet
Asked by
Anupkumar
Top achievements
Rank 1
Answers by
Tanya
Telerik team
Anupkumar
Top achievements
Rank 1
Share this question
or