473,512 Members | 15,196 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Export aspx/vb .net to multi-tabbed Excel?

I have been searching everywhere AND am a bit new to vb .net/aspx, but can't
seem to find anything that works. Specifically, I need to export a dataset
from a webapp written in vb .net to a new excel spreadsheet with multiple
tabs (each tab would contain different rows from the dataset). Does anyone
have any sample code or examples I might look at?

tia,
Bill
Nov 8 '07 #1
10 3877
LVP
Bill,

This is easy,

You can put your data in datagrid then export it to excel. See. Not sure
what you mean by tab ( your terminology is confusing )

http://www.c-sharpcorner.com/UploadF...idToExcel.aspx
Good luck

"bill" <bi**@nospam.comwrote in message
news:kx*************@newsfe06.lga...
>I have been searching everywhere AND am a bit new to vb .net/aspx, but
can't seem to find anything that works. Specifically, I need to export a
dataset from a webapp written in vb .net to a new excel spreadsheet with
multiple tabs (each tab would contain different rows from the dataset).
Does anyone have any sample code or examples I might look at?

tia,
Bill

Nov 8 '07 #2
Thanks for the quick reply!!

That method is how I am currently doing it just for a quick-and-dirty
export. Unfortunately, the client needs multiple worksheets within the
workbook to hold data (the method I am using and that which is outlined in
your link creates a single workbook with a single sheet)....

Bill

"LVP" <lv**********@hotmail.comwrote in message
news:e9**************@TK2MSFTNGP03.phx.gbl...
Bill,

This is easy,

You can put your data in datagrid then export it to excel. See. Not sure
what you mean by tab ( your terminology is confusing )

http://www.c-sharpcorner.com/UploadF...idToExcel.aspx
Good luck

"bill" <bi**@nospam.comwrote in message
news:kx*************@newsfe06.lga...
>>I have been searching everywhere AND am a bit new to vb .net/aspx, but
can't seem to find anything that works. Specifically, I need to export a
dataset from a webapp written in vb .net to a new excel spreadsheet with
multiple tabs (each tab would contain different rows from the dataset).
Does anyone have any sample code or examples I might look at?

tia,
Bill


Nov 8 '07 #3
LVP
Bill,

here is a link for you: http://support.microsoft.com/kb/306023
Use Office API


"bill" <bi**@nospam.comwrote in message
news:zA************@newsfe06.lga...
Thanks for the quick reply!!

That method is how I am currently doing it just for a quick-and-dirty
export. Unfortunately, the client needs multiple worksheets within the
workbook to hold data (the method I am using and that which is outlined in
your link creates a single workbook with a single sheet)....

Bill

"LVP" <lv**********@hotmail.comwrote in message
news:e9**************@TK2MSFTNGP03.phx.gbl...
>Bill,

This is easy,

You can put your data in datagrid then export it to excel. See. Not sure
what you mean by tab ( your terminology is confusing )

http://www.c-sharpcorner.com/UploadF...idToExcel.aspx
Good luck

"bill" <bi**@nospam.comwrote in message
news:kx*************@newsfe06.lga...
>>>I have been searching everywhere AND am a bit new to vb .net/aspx, but
can't seem to find anything that works. Specifically, I need to export a
dataset from a webapp written in vb .net to a new excel spreadsheet with
multiple tabs (each tab would contain different rows from the dataset).
Does anyone have any sample code or examples I might look at?

tia,
Bill



Nov 8 '07 #4
"LVP" <lv**********@hotmail.comwrote in message
news:Oo**************@TK2MSFTNGP06.phx.gbl...
Bill,

here is a link for you: http://support.microsoft.com/kb/306023

Use Office API
Ignore this completely...

Server-side automation is completely unsupported by Microsoft because it's
far too risky and unstable - Office just wasn't designed to be run in this
way:
http://support.microsoft.com/default...US;q257757#kb2
http://support.microsoft.com/default.aspx/kb/288367

If you need multiple worksheets, you have two choices:

1) OpenXML
http://www.microsoft.com/downloads/d...displaylang=en
http://www.microsoft.com/downloads/d...displaylang=en

2) Aspose
http://www.aspose.com/Products/Aspos...s/Default.aspx
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Nov 8 '07 #5
"bill" <bi**@nospam.comwrote in message
news:53*************@newsfe06.lga...
I have never worked with XML before, so am quite green in this area.
Then I have to say that I think you'll find OpenXML a bit of a challenge...
Even seasoned XML gurus think twice about it...

I would strongly urge you to consider the Aspose alternative... You'll find
that it works almost identically to Office automation - without using Office
automation...

It's not free, of course, so I guess you'll make your choice according to
how much your time is worth... :-)
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Nov 8 '07 #6
LVP
hay it works for me...
"Mark Rae [MVP]" <ma**@markNOSPAMrae.netwrote in message
news:eZ**************@TK2MSFTNGP06.phx.gbl...
"LVP" <lv**********@hotmail.comwrote in message
news:Oo**************@TK2MSFTNGP06.phx.gbl...
>Bill,

here is a link for you: http://support.microsoft.com/kb/306023

Use Office API

Ignore this completely...

Server-side automation is completely unsupported by Microsoft because it's
far too risky and unstable - Office just wasn't designed to be run in this
way:
http://support.microsoft.com/default...US;q257757#kb2
http://support.microsoft.com/default.aspx/kb/288367

If you need multiple worksheets, you have two choices:

1) OpenXML
http://www.microsoft.com/downloads/d...displaylang=en
http://www.microsoft.com/downloads/d...displaylang=en

2) Aspose
http://www.aspose.com/Products/Aspos...s/Default.aspx
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Nov 8 '07 #7
LVP - a couple of quick questions:

1. When you create the spreadsheet on the server, do you do a
response.redirect so the user can then see the spreadsheet? And if so, how
do you clean up the spreadsheet from the server?

2. How many users do you have using this method and have you encountered
many issues?

thanks again!
Bill
"LVP" <lv**********@hotmail.comwrote in message
news:OA**************@TK2MSFTNGP05.phx.gbl...
hay it works for me...
"Mark Rae [MVP]" <ma**@markNOSPAMrae.netwrote in message
news:eZ**************@TK2MSFTNGP06.phx.gbl...
>"LVP" <lv**********@hotmail.comwrote in message
news:Oo**************@TK2MSFTNGP06.phx.gbl...
>>Bill,

here is a link for you: http://support.microsoft.com/kb/306023

Use Office API

Ignore this completely...

Server-side automation is completely unsupported by Microsoft because
it's far too risky and unstable - Office just wasn't designed to be run
in this way:
http://support.microsoft.com/default...US;q257757#kb2
http://support.microsoft.com/default.aspx/kb/288367

If you need multiple worksheets, you have two choices:

1) OpenXML
http://www.microsoft.com/downloads/d...displaylang=en
http://www.microsoft.com/downloads/d...displaylang=en

2) Aspose
http://www.aspose.com/Products/Aspos...s/Default.aspx
--
Mark Rae
ASP.NET MVP
http://www.markrae.net


Nov 9 '07 #8
LVP
To be safe go with Mark's Recommendations.

1. I create my spreadsheet saving it with a Unique Name. can do GUID+.
2. I stream it to the user. on one screen I have links of only available
docs
3. I clean all docs that are older than 2 hours. can be different.
4. I have hundreds of user but not concurrent. ( few concurrent ).

As I said it works for me, in my environment for my needs

All servers have issues, with or without this.
"bill" <bi**@nospam.comwrote in message
news:0W************@newsfe06.lga...
LVP - a couple of quick questions:

1. When you create the spreadsheet on the server, do you do a
response.redirect so the user can then see the spreadsheet? And if so,
how do you clean up the spreadsheet from the server?

2. How many users do you have using this method and have you encountered
many issues?

thanks again!
Bill
"LVP" <lv**********@hotmail.comwrote in message
news:OA**************@TK2MSFTNGP05.phx.gbl...
>hay it works for me...
"Mark Rae [MVP]" <ma**@markNOSPAMrae.netwrote in message
news:eZ**************@TK2MSFTNGP06.phx.gbl...
>>"LVP" <lv**********@hotmail.comwrote in message
news:Oo**************@TK2MSFTNGP06.phx.gbl...

Bill,

here is a link for you: http://support.microsoft.com/kb/306023

Use Office API

Ignore this completely...

Server-side automation is completely unsupported by Microsoft because
it's far too risky and unstable - Office just wasn't designed to be run
in this way:
http://support.microsoft.com/default...US;q257757#kb2
http://support.microsoft.com/default.aspx/kb/288367

If you need multiple worksheets, you have two choices:

1) OpenXML
http://www.microsoft.com/downloads/d...displaylang=en
http://www.microsoft.com/downloads/d...displaylang=en

2) Aspose
http://www.aspose.com/Products/Aspos...s/Default.aspx
--
Mark Rae
ASP.NET MVP
http://www.markrae.net



Nov 9 '07 #9
Thanks for the reply and information!! I am leaning in your direction as
well, for a few different reasons, which is why I am asking a few more
questions... :-)

How you streaming the file to the user?

Thanks again for the info!
Bill
"LVP" <lv**********@hotmail.comwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
To be safe go with Mark's Recommendations.

1. I create my spreadsheet saving it with a Unique Name. can do GUID+.
2. I stream it to the user. on one screen I have links of only available
docs
3. I clean all docs that are older than 2 hours. can be different.
4. I have hundreds of user but not concurrent. ( few concurrent ).

As I said it works for me, in my environment for my needs

All servers have issues, with or without this.
"bill" <bi**@nospam.comwrote in message
news:0W************@newsfe06.lga...
>LVP - a couple of quick questions:

1. When you create the spreadsheet on the server, do you do a
response.redirect so the user can then see the spreadsheet? And if so,
how do you clean up the spreadsheet from the server?

2. How many users do you have using this method and have you encountered
many issues?

thanks again!
Bill
"LVP" <lv**********@hotmail.comwrote in message
news:OA**************@TK2MSFTNGP05.phx.gbl...
>>hay it works for me...
"Mark Rae [MVP]" <ma**@markNOSPAMrae.netwrote in message
news:eZ**************@TK2MSFTNGP06.phx.gbl...
"LVP" <lv**********@hotmail.comwrote in message
news:Oo**************@TK2MSFTNGP06.phx.gbl...

Bill,
>
here is a link for you: http://support.microsoft.com/kb/306023
>
Use Office API

Ignore this completely...

Server-side automation is completely unsupported by Microsoft because
it's far too risky and unstable - Office just wasn't designed to be run
in this way:
http://support.microsoft.com/default...US;q257757#kb2
http://support.microsoft.com/default.aspx/kb/288367

If you need multiple worksheets, you have two choices:

1) OpenXML
http://www.microsoft.com/downloads/d...displaylang=en
http://www.microsoft.com/downloads/d...displaylang=en

2) Aspose
http://www.aspose.com/Products/Aspos...s/Default.aspx
--
Mark Rae
ASP.NET MVP
http://www.markrae.net




Nov 9 '07 #10
LVP
I but the file into a buffer byte[] array and Response.write(......
I have one aspx page that dishes out PDFs, Excel, JPG, GIF etc...
Response.ContentType = "MimeTypeHere" application/excel,
application/pdf, application/octet-stream
http://www.webmaster-toolkit.com/mime-types.shtml

Response.OutputStream.Write(Buffer, 0, Buffer.Length)

Response.Flush()

Response.End()

set the mimetype etc... So the browser can recognize it properly and the
client will decide to open or save.

Also you can do a Link and let IIS dish it out.

"bill" <bi**@nospam.comwrote in message
news:12************@newsfe06.lga...
Thanks for the reply and information!! I am leaning in your direction as
well, for a few different reasons, which is why I am asking a few more
questions... :-)

How you streaming the file to the user?

Thanks again for the info!
Bill
"LVP" <lv**********@hotmail.comwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
>To be safe go with Mark's Recommendations.

1. I create my spreadsheet saving it with a Unique Name. can do GUID+.
2. I stream it to the user. on one screen I have links of only available
docs
3. I clean all docs that are older than 2 hours. can be different.
4. I have hundreds of user but not concurrent. ( few concurrent ).

As I said it works for me, in my environment for my needs

All servers have issues, with or without this.
"bill" <bi**@nospam.comwrote in message
news:0W************@newsfe06.lga...
>>LVP - a couple of quick questions:

1. When you create the spreadsheet on the server, do you do a
response.redirect so the user can then see the spreadsheet? And if so,
how do you clean up the spreadsheet from the server?

2. How many users do you have using this method and have you
encountered many issues?

thanks again!
Bill
"LVP" <lv**********@hotmail.comwrote in message
news:OA**************@TK2MSFTNGP05.phx.gbl...
hay it works for me...
"Mark Rae [MVP]" <ma**@markNOSPAMrae.netwrote in message
news:eZ**************@TK2MSFTNGP06.phx.gbl...
"LVP" <lv**********@hotmail.comwrote in message
news:Oo**************@TK2MSFTNGP06.phx.gbl.. .
>
>Bill,
>>
>here is a link for you: http://support.microsoft.com/kb/306023
>>
>Use Office API
>
Ignore this completely...
>
Server-side automation is completely unsupported by Microsoft because
it's far too risky and unstable - Office just wasn't designed to be
run in this way:
http://support.microsoft.com/default...US;q257757#kb2
http://support.microsoft.com/default.aspx/kb/288367
>
If you need multiple worksheets, you have two choices:
>
1) OpenXML
http://www.microsoft.com/downloads/d...displaylang=en
http://www.microsoft.com/downloads/d...displaylang=en
>
2) Aspose
http://www.aspose.com/Products/Aspos...s/Default.aspx
>
>
--
Mark Rae
ASP.NET MVP
http://www.markrae.net




Nov 9 '07 #11

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

Similar topics

1
3527
by: goonsquad | last post by:
I have a multi-statement sql script that creates two temporary tables and then runs a query on them. The query runs fine. However, I want to use phpMyAdmin to export the data to .csv format. The...
5
11006
by: Tim Eliot | last post by:
Just wondering if anyone has hit the following issue and how you might have sorted it out. I am using the command: DoCmd.TransferText acExportMerge, , stDataSource, stFileName, True after...
4
3731
by: Mandar | last post by:
I am trying to export crystal report to pdf. but i am getting folloing error: "Error in File C:\DOCUME~1\MKM-BA~1\ASPNET\LOCALS~1\Temp\temp_0c6b2c59-df8a-4b26-a570-a2189ee212ac.rpt: Access to report...
0
1757
by: Leonard Danao | last post by:
Anyone have any ideas as to why this is happenning. There are no other versions of Crystal installed aside from the one that came with vs2003 enterprise. the error happens when the...
10
24039
by: bienwell | last post by:
Hi, I have a question about file included in ASP.NET. I have a file that includes all the Sub functions (e.g FileFunct.vb). One of the functions in this file is : Sub TestFunct(ByVal...
6
1828
by: John Rivers | last post by:
hi, here is how to do it and restore sanity to aspx html rendering: (please only reply with sensible architectural discussion - juan) put this at the end of an aspx file (or use an include at...
1
1336
by: socasteel21 via AccessMonster.com | last post by:
I have a multi-user database that stores warranty claims. I would like to be able to export all critical tables to a backup database when the introductory form is opened. The problem is the...
3
1323
by: Bob Altman | last post by:
In my unmanaged C++ app (VS 2005) I have written a class that inherits from exception. I want to export this class from a library DLL, but the compiler complains because exception is not itself...
1
9504
by: tong_su | last post by:
Hi, I am using udb version 8 fixpack 12 installed on Linux. I need to move a schema from one db to another. All tables in the target and source schemas are created using 'CCSID UNICODE'. I used...
3
5581
by: =?Utf-8?B?WVhR?= | last post by:
I want to export some keys to a reg file using "regedit /e", how to export more keys to one file once but no only a key? thank you.
0
7252
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7153
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...
1
7093
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7517
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...
0
5676
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,...
1
5077
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...
0
3230
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3218
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
452
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...

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.