473,656 Members | 2,983 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Exporting GridView data to Multiple File Formats

Hi,

The following is from my friend who has only restricted net access
from his office and hence cannot post....

--------------------------------------------------------------------------------------------------
I am trying to export a GridView data to multiple file formats. The
requirement is that when more than one file format is selected and the
"Submit" button is clicked, the data from the grid needs to get
exported to multiple file formats. First of all is it possible? I am
using ASP.NET 2.0 and VS 2005. If possible can you give me any hints
as to how to go about it? Thank you.

Right now I am using the Response.Conten tType method to export to the
specified file format. I just change the extension to the file type
that is required (for e.g. For xml, I give .xml and for html I
give .html). I am using a HTMLTextWriter to perform this operation. I
am rendering the GridView control to export the data.

I have been successful to export it to a single file format at one
time. But it does not work when multiple selections are made. Even
then I am able to export in only one format. Can you please help me..?
Thank you.

---------------------------------------------------------------------------------------------

Thanks & Regards,
-feltra

Jul 19 '07 #1
1 2611
HTTP = 1 Request to 1 Response. If the client browser launches child browser
windows, each can display a file.

--
HTH,

Kevin Spencer
Microsoft MVP

Printing Components, Email Components,
FTP Client Classes, Enhanced Data Controls, much more.
DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net

"feltra" <fe****@gmail.c omwrote in message
news:11******** ************@e1 6g2000pri.googl egroups.com...
Hi,

The following is from my friend who has only restricted net access
from his office and hence cannot post....

--------------------------------------------------------------------------------------------------
I am trying to export a GridView data to multiple file formats. The
requirement is that when more than one file format is selected and the
"Submit" button is clicked, the data from the grid needs to get
exported to multiple file formats. First of all is it possible? I am
using ASP.NET 2.0 and VS 2005. If possible can you give me any hints
as to how to go about it? Thank you.

Right now I am using the Response.Conten tType method to export to the
specified file format. I just change the extension to the file type
that is required (for e.g. For xml, I give .xml and for html I
give .html). I am using a HTMLTextWriter to perform this operation. I
am rendering the GridView control to export the data.

I have been successful to export it to a single file format at one
time. But it does not work when multiple selections are made. Even
then I am able to export in only one format. Can you please help me..?
Thank you.

---------------------------------------------------------------------------------------------

Thanks & Regards,
-feltra

Jul 19 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
9237
by: sridevi | last post by:
Hello How to export data from ms-access database to excel worksheet using ASP. mainly i need to export data to multiple worksheets. it is very urgent to us. i have a sample code which works only exporting to single worksheet. but i need to export data to multiple worksheets. it is very urgent to us. so please help me in code.
1
1987
by: TY | last post by:
Any tips on exporting my existing Q&A 4(DOS) to access 2002. I have the following options in Q&A, DIF Standard ASCII Fixed ASCII dBase II " III " IV Paradox 2.0/3.0
6
12578
by: Kevin Humphreys | last post by:
Hi There, I am trying to export a recordset to an excel file using the Content Type below in the header. Response.ContentType = "application/vnd.ms-excel" Which works fine however the problem is that when I have a number in a column with a leading zero the zero gets dropped.
3
2047
by: David P. Donahue | last post by:
I'm re-writing an application in C# that was originally written in Delphi 7. The heart of the application is a DataSet displayed in a DataGrid. One of the main functions of the previous application was to save the data to a file (it was XML, but the format is unimportant) that can be re-loaded into the DataSet at a later time. (The reason for this was that the queries which populate the DataSet can take a while to run, and people...
4
2508
by: Tom | last post by:
I have a gridview on all of my web pages in my web app and they all export to excel. I have one page where the gridview is binding to a datatable that i created and only the first column is exporting to excel. How can I get the entire grid to export to excel?
0
1708
by: =?Utf-8?B?ZGVuIDIwMDU=?= | last post by:
hi, I trying to export data display on a gridview that supports any language (like chinese, japanese, thai, french) shown here is chinese only. There is no problem exporting english language data, problem starts exporting non-english data using approach shown below, the data is retrieve in database in an xml format. Is there a simple way to be able to make this work? Response.ContentEncoding = System.Text.Encoding.UTF8;
0
1267
by: gujarsachin2001 | last post by:
Hi Friends, I am expeorting data from gridview to excel data is exporting fine .But saving file or cancling saving file when I am coming back to my web page it gets hanged ......... So can any body please help me out. Thanks, Sachin.
0
1653
by: feltra | last post by:
Hi all, I am trying to export a GridView data to multiple file formats. The requirement is that when more than one file format is selected and the "Submit" button is clicked, the data from the grid needs to get exported to multiple file formats. First of all is it possible? I am using ASP.NET 2.0 and VS 2005. If possible can you give me any hints as to how to go about it? Thank you. Right now I am using the Response.ContentType method...
0
1141
by: Dan | last post by:
Hi, i have some problem with exporting data from sql server to some formats. Excel and Word are not a problem, but .txt and .csv do not work properly: - with .txt, the data are shown (correctly) in the browser but the windows asking to save or to open the file never appears. - with .csv, the code below produces an identical excel file as with.xls (no comma). Here an extract of the code:
0
8296
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8816
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8598
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7310
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6162
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5627
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4299
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2721
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1598
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.