473,395 Members | 2,796 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Export Data to Ms Excel 2000

Hi ,

I have no idea on how to export data to Ms Excel 2000.
I have a screen which contain a check box list that allow user to select which fields to be exported to MS Excel.
When user checked on the check box, that field's data from database will be exported to Ms Excel.
My program is client -based system.
Programming language=VB.NET
Software=MS Visual Studio.net2003
Platform=Window XP Pro,SP1


Thanks for all of yours helps......

Carol
Oct 28 '06 #1
2 2628
Hi ,

I have no idea on how to export data to Ms Excel 2000.
I have a screen which contain a check box list that allow user to select which fields to be exported to MS Excel.
When user checked on the check box, that field's data from database will be exported to Ms Excel.
My program is client -based system.
Programming language=VB.NET
Software=MS Visual Studio.net2003
Platform=Window XP Pro,SP1


Thanks for all of yours helps......

Carol

hi carol

just try this you can insert records into excel with this code.

******************************************

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here

'Create new Excel Object
Dim MyExcel As Excel.Application

MyExcel = New Excel.Application
MyExcel.DisplayAlerts = False
MyExcel.Workbooks.Open("C:\Inetpub\wwwroot\WebAppl ication1\Excel1.xls")
Label1.Text = MyExcel.ActiveWorkbook.ActiveSheet.Cells(1, 1).Value

'Insert data into particular cell of Excel Sheet
MyExcel.ActiveWorkbook.ActiveSheet.cells(2, 4) = "Example"

MyExcel.ActiveWorkbook.Save()
MyExcel.ActiveWorkbook.Close(False, "C:\Inetpub\wwwroot\WebApplication1\Excel1.xls ")
MyExcel.DisplayAlerts = False
MyExcel.Quit()


ReleaseComObject(MyExcel)
MyExcel = Nothing
GC.Collect(1)
GC.WaitForPendingFinalizers()
End Sub

********************************

but informing you that i have problem with this code is that..
my Excel.EXE is still running in background even after i close my application.

i am still trying on that..mean time if you get something how to kill it let me know
thanks

mady
Oct 31 '06 #2
kenvil
1
that's a really big problem in using Excel Object. that was also my problem before
the only solution i know that will work in disposing the excel object is the kill the process itself

the code goes like these:

Dim myProcesses As Process() = Process.GetProcessesByName("EXCEL")
Dim myProcess As Process
For Each myProcess In myProcesses
myProcess.Kill()
Next myProcess
Nov 1 '06 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Funbeat | last post by:
Hi everybody, I'm facing with the following problem (bug ?) : A page is calling another one (export.aspx) for exporting data to excel. The tecnhique used is to create a Excel-MIME stream...
1
by: Alex | last post by:
Hi all, In MS SQL Management Console I can right-click on any Table and I have the option All Tasks > Export Data where I can export the table to Excel. In a View however this isn't there. I...
4
by: Gary Wright | last post by:
I have an Access 2K database split into front and back. Quite often the users want to do some data analysis that I have not created a report for so they want to export some subset of the data into...
3
by: Sonu | last post by:
Greetings - I am trying to export a tbl from Access 2000 that has 26,544 records. When I export the tbl to Excel, it only exports out 16,384 records. It also creates a tbl that shows the data...
0
by: Max Mayer | last post by:
Hello everybody, I have implemented a windows form in C# .NET to export data from a listbox to Excel. I work on a Windows XP machine with Office 97 and .NET framework 1.1 SDK installed. I use...
0
by: Max Mayer | last post by:
Hello everybody, I have implemented a windows form in C# .NET to export data from a listbox to Excel. I work on a Windows XP machine with Office 97 and .NET framework 1.1 SDK installed. I use...
0
by: chris.feyrer | last post by:
I need to export data from SQL server 2000 (or SQL server 2005 with a db connection to the SQL 2000 server) to a DB4 file via DTS. When I use Windows 2000 server to attempt the export, I keep...
1
by: smaczylo | last post by:
Hello, I've recently been asked to work with Microsoft Access, and while I feel quite comfortable with Excel, I'm at a complete loss with databases. If someone could help me with this issue I'm...
3
by: StevoNZ | last post by:
I've been using Access to export data to Excel all year... this data has been increasing in size as the project nears compleion and now I find that when I export a table (or query) to Excel using the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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
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,...

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.