473,473 Members | 1,895 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Extract Oracle data to Excel without header

1 New Member
Hi,

Anyone know how to extarct data from Oracle to excel without the header using vb.net?

Below is my coding:

Dim rst As ADODB.Recordset

cn = New ADODB.Connection

With cn
.ConnectionString = "Provider=MSDAORA.1; " & conn.getCsatConnection()
.CursorLocation = CursorLocationEnum.adUseClient
.Open()
End With

Dim a As String

a="Select * from Backlog"

rst = cn.Execute(a)
Dim oXL As _Application
Dim oWB As _Workbook
Dim oSheet As _Worksheet()
Dim obj As Object
Dim filename As String

ReDim oSheet(3)


oSheet(0) = oWB.Worksheets(1)
oSheet(0).Name = "Backlog Data"
obj = oSheet(0).QueryTables.Add(rst, oSheet(0).Range("A1"))
obj.BackgroundQuery = False
obj.Recordset = rst
obj.Refresh()

oXL.DisplayAlerts = False
filename = "C:\Backlog.xls"
oWB.SaveAs(filename)

The coding is workign fine, just that I want to exlude the header when extact to excel file.


Thanks in advance

Regards,
Steve
Jul 24 '07 #1
1 1729
kenobewan
4,871 Recognized Expert Specialist
One way is to remove unwanted columns (header text listed in removeColumnList arraylist) before you write to the xml. Here is a portion of c# code used for that purpose:
Expand|Select|Wrap|Line Numbers
  1.             foreach (DataControlField field in grdView.Columns)
  2.             {              
  3.                 if (excludedColumnList.Contains(field.HeaderText))
  4.                 {
  5.                     field.Visible = false;
  6.                 }
  7.             } 
Jul 24 '07 #2

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

Similar topics

0
by: Mark Townsend | last post by:
Following is a summary of articles spanning a 7 day period, beginning at 23 Feb 2004 05:29:19 GMT and ending at 01 Mar 2004 04:12:14 GMT. Notes ===== - A line in the body of a post is...
13
by: BigDaDDY | last post by:
Um yeah....In case you haven't figured it out, Microsoft sucks. I'm going to be kicked back in my chair eating popcorn and watching football 10 years from now, while all you clowns are scrambling...
9
by: Brian Hanson | last post by:
Hi, I have an unusual problem that just showed its ugly head at a pretty bad time. I have an asp.net (VB) app that takes data from an Excel sheet and puts it into SQL Server. I get the data...
6
by: Elena | last post by:
I'm trying to export data to an Excel worksheet. I can export the data in the cell values perfectly. I need the code to change a header and footer for the worksheet, not for the columns. Is...
3
by: maylee21 | last post by:
hi, anyone can help me figure out how to read data from a text file like this: 10980012907200228082002 and extract the data according to this kind of format: Record type 1 TY-RECORD ...
8
by: dr3586 | last post by:
Hi, I have an Oracle PL/SQL procedure that extracts data into an excel worksheet. I am wondering if there is anyway from the procedure to also set the macros of the excel document that is...
7
Merlin1857
by: Merlin1857 | last post by:
Its great producing data for users to look at in your web pages and generally that is sufficient for their needs but sometimes you may want to supply your user with the data in a form they can...
1
by: Master Ken | last post by:
Hi All, I'm very new to C# and ASP and I am asking for some help as I don't really know where to start on this project. Some background info first I run a report each week which outputs data...
0
by: =?ISO-8859-1?Q?J=F6rg_Battermann?= | last post by:
Hello there, Is there any -reliable- way to extract certain, given ranges in excel files into either a picture (each) or into proper xhtml? I am asking because I am currently automating a...
0
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
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
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
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
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...
0
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
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 ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.