473,385 Members | 1,848 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,385 software developers and data experts.

SQL query to Excel file

I'm trying to output a SQL query that is constructed thru my VB.net GUI
into an excel file.

Here is the code I'm using:

'Sqlstmt is the SQL query statement
'Conn is the SQL Connection object

cmd = New SqlCommand(Sqlstmt, Conn)
datareader = cmd.ExecuteReader()
'datareader is the SQLdatareader object

Dim objexcel As Excel.Application
Dim objwkb As Workbook
Dim objwksht As Worksheet

objexcel = New Excel.Application
objwkb = objexcel.Workbooks.Add
objwksht = objwkb.ActiveSheet()

Dim cols = datareader.FieldCount()
objwksht.Range(objwksht.Cells(1, 1), objwksht.Cells(5,
cols)).CopyFromRecordset(datareader)

The line above is causing an exception, i.e., I never receive any data
in the excel sheet. I put this in a try statement to catch the
exception and it is this:

System.InvalidCastException: No such interface supported
at System.RuntimeType.ForwardCallToInvokeMember(Strin g memberName,
BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData&
msgData)
at Excel.Range.CopyFromRecordset(Object Data, Object MaxRows, Object
MaxColumns)
at WindowsApplication1.Form1.btGenReport_Click(Object sender,
EventArgs e) in C:.....\Form1.vb:line 416
I'm a complete newbie at .NET (Unix C/C++ programming background).

Can anyone advise about what I'm doing wrong? I've sort of "learnt" the
code from others, so the Range command is kinda sketchy to me.....

What other alternative ways would there be to take the "datareader"
data and put it in an excel file (I'm trying to create a report based
on the data from a SQL table)?

Thanks!

Aug 16 '06 #1
19 12706
do you know what you're doing wrong?

excel is a SPREADSHEET and a DISEASE

keep your data in a database
Access has MUCH better datagrids than any of this .NET crap.

Use Access. Uninstall Excel and .NET.

Preferable Access Data Projects if you're using SQL Server.
if you're not using SQL Server then start

-Aaron


wreckingcru wrote:
I'm trying to output a SQL query that is constructed thru my VB.net GUI
into an excel file.

Here is the code I'm using:

'Sqlstmt is the SQL query statement
'Conn is the SQL Connection object

cmd = New SqlCommand(Sqlstmt, Conn)
datareader = cmd.ExecuteReader()
'datareader is the SQLdatareader object

Dim objexcel As Excel.Application
Dim objwkb As Workbook
Dim objwksht As Worksheet

objexcel = New Excel.Application
objwkb = objexcel.Workbooks.Add
objwksht = objwkb.ActiveSheet()

Dim cols = datareader.FieldCount()
objwksht.Range(objwksht.Cells(1, 1), objwksht.Cells(5,
cols)).CopyFromRecordset(datareader)

The line above is causing an exception, i.e., I never receive any data
in the excel sheet. I put this in a try statement to catch the
exception and it is this:

System.InvalidCastException: No such interface supported
at System.RuntimeType.ForwardCallToInvokeMember(Strin g memberName,
BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData&
msgData)
at Excel.Range.CopyFromRecordset(Object Data, Object MaxRows, Object
MaxColumns)
at WindowsApplication1.Form1.btGenReport_Click(Object sender,
EventArgs e) in C:.....\Form1.vb:line 416
I'm a complete newbie at .NET (Unix C/C++ programming background).

Can anyone advise about what I'm doing wrong? I've sort of "learnt" the
code from others, so the Range command is kinda sketchy to me.....

What other alternative ways would there be to take the "datareader"
data and put it in an excel file (I'm trying to create a report based
on the data from a SQL table)?

Thanks!
Aug 17 '06 #2
That's really an opinion and not a solution.
I think Excel is awesome.
Anyway, this is not my discretion. I HAVE to work with a SQL database
(remote) - that's what been handed down to me. I have the connection
string and UID/Pass to connect to it and based on the GUI input, I'm
constructing the query.

I'd like to debug my problem - not hear about what's wrong with
Microsoft.
aa*********@gmail.com wrote:
do you know what you're doing wrong?

excel is a SPREADSHEET and a DISEASE

keep your data in a database
Access has MUCH better datagrids than any of this .NET crap.

Use Access. Uninstall Excel and .NET.

Preferable Access Data Projects if you're using SQL Server.
if you're not using SQL Server then start

-Aaron


wreckingcru wrote:
I'm trying to output a SQL query that is constructed thru my VB.net GUI
into an excel file.

Here is the code I'm using:

'Sqlstmt is the SQL query statement
'Conn is the SQL Connection object

cmd = New SqlCommand(Sqlstmt, Conn)
datareader = cmd.ExecuteReader()
'datareader is the SQLdatareader object

Dim objexcel As Excel.Application
Dim objwkb As Workbook
Dim objwksht As Worksheet

objexcel = New Excel.Application
objwkb = objexcel.Workbooks.Add
objwksht = objwkb.ActiveSheet()

Dim cols = datareader.FieldCount()
objwksht.Range(objwksht.Cells(1, 1), objwksht.Cells(5,
cols)).CopyFromRecordset(datareader)

The line above is causing an exception, i.e., I never receive any data
in the excel sheet. I put this in a try statement to catch the
exception and it is this:

System.InvalidCastException: No such interface supported
at System.RuntimeType.ForwardCallToInvokeMember(Strin g memberName,
BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData&
msgData)
at Excel.Range.CopyFromRecordset(Object Data, Object MaxRows, Object
MaxColumns)
at WindowsApplication1.Form1.btGenReport_Click(Object sender,
EventArgs e) in C:.....\Form1.vb:line 416
I'm a complete newbie at .NET (Unix C/C++ programming background).

Can anyone advise about what I'm doing wrong? I've sort of "learnt" the
code from others, so the Range command is kinda sketchy to me.....

What other alternative ways would there be to take the "datareader"
data and put it in an excel file (I'm trying to create a report based
on the data from a SQL table)?

Thanks!
Aug 17 '06 #3
On 16 Aug 2006 12:12:15 -0700, "wreckingcru" <pr*********@gmail.comwrote:

¤ I'm trying to output a SQL query that is constructed thru my VB.net GUI
¤ into an excel file.
¤
¤ Here is the code I'm using:
¤
¤ 'Sqlstmt is the SQL query statement
¤ 'Conn is the SQL Connection object
¤
¤ cmd = New SqlCommand(Sqlstmt, Conn)
¤ datareader = cmd.ExecuteReader()
¤ 'datareader is the SQLdatareader object
¤
¤ Dim objexcel As Excel.Application
¤ Dim objwkb As Workbook
¤ Dim objwksht As Worksheet
¤
¤ objexcel = New Excel.Application
¤ objwkb = objexcel.Workbooks.Add
¤ objwksht = objwkb.ActiveSheet()
¤
¤ Dim cols = datareader.FieldCount()
¤
¤
¤ objwksht.Range(objwksht.Cells(1, 1), objwksht.Cells(5,
¤ cols)).CopyFromRecordset(datareader)
¤
¤ The line above is causing an exception, i.e., I never receive any data
¤ in the excel sheet. I put this in a try statement to catch the
¤ exception and it is this:
¤
¤ System.InvalidCastException: No such interface supported
¤ at System.RuntimeType.ForwardCallToInvokeMember(Strin g memberName,
¤ BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData&
¤ msgData)
¤ at Excel.Range.CopyFromRecordset(Object Data, Object MaxRows, Object
¤ MaxColumns)
¤ at WindowsApplication1.Form1.btGenReport_Click(Object sender,
¤ EventArgs e) in C:.....\Form1.vb:line 416
¤

CopyFromRecordset only supports ADO and DAO Recordset objects. It does not support ADO.NET.

You could try doing this using straight SQL:

Dim ExcelConnection As New
System.Data.OleDb.OleDbConnection("Provider=Micros oft.Jet.OLEDB.4.0;" & _
"Data Source=" & "c:\Test
Files\ExcelWB.xls" & ";" & _
"Extended Properties=Excel
8.0;")

ExcelConnection.Open()

Dim ExcelCommand As New System.Data.OleDb.OleDbCommand("SELECT * INTO [Orders] FROM [Orders]
IN '' [ODBC;Driver={SQL Server};Server=(local);Database=Northwind;Trusted_ Connection=yes];",
ExcelConnection)

ExcelCommand.ExecuteNonQuery()
ExcelConnection.Close()
Paul
~~~~
Microsoft MVP (Visual Basic)
Aug 17 '06 #4
you might think that Excel is AWESOME but it's not a database reporting
tool.

does it even support parameters on sprocs?

lol

Excel is for babies.. run away while you still can

I'm sick and tired of dealing with SpreadMarts.

Excel shouldn't be used for reporting.. it doesn't have 1/10th of the
funcitonality that it needs to be a serious reporting platform


wreckingcru wrote:
That's really an opinion and not a solution.
I think Excel is awesome.
Anyway, this is not my discretion. I HAVE to work with a SQL database
(remote) - that's what been handed down to me. I have the connection
string and UID/Pass to connect to it and based on the GUI input, I'm
constructing the query.

I'd like to debug my problem - not hear about what's wrong with
Microsoft.
aa*********@gmail.com wrote:
do you know what you're doing wrong?

excel is a SPREADSHEET and a DISEASE

keep your data in a database
Access has MUCH better datagrids than any of this .NET crap.

Use Access. Uninstall Excel and .NET.

Preferable Access Data Projects if you're using SQL Server.
if you're not using SQL Server then start

-Aaron


wreckingcru wrote:
I'm trying to output a SQL query that is constructed thru my VB.net GUI
into an excel file.
>
Here is the code I'm using:
>
'Sqlstmt is the SQL query statement
'Conn is the SQL Connection object
>
cmd = New SqlCommand(Sqlstmt, Conn)
datareader = cmd.ExecuteReader()
'datareader is the SQLdatareader object
>
Dim objexcel As Excel.Application
Dim objwkb As Workbook
Dim objwksht As Worksheet
>
objexcel = New Excel.Application
objwkb = objexcel.Workbooks.Add
objwksht = objwkb.ActiveSheet()
>
Dim cols = datareader.FieldCount()
>
>
objwksht.Range(objwksht.Cells(1, 1), objwksht.Cells(5,
cols)).CopyFromRecordset(datareader)
>
The line above is causing an exception, i.e., I never receive any data
in the excel sheet. I put this in a try statement to catch the
exception and it is this:
>
System.InvalidCastException: No such interface supported
at System.RuntimeType.ForwardCallToInvokeMember(Strin g memberName,
BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData&
msgData)
at Excel.Range.CopyFromRecordset(Object Data, Object MaxRows, Object
MaxColumns)
at WindowsApplication1.Form1.btGenReport_Click(Object sender,
EventArgs e) in C:.....\Form1.vb:line 416
>
>
I'm a complete newbie at .NET (Unix C/C++ programming background).
>
Can anyone advise about what I'm doing wrong? I've sort of "learnt" the
code from others, so the Range command is kinda sketchy to me.....
>
What other alternative ways would there be to take the "datareader"
data and put it in an excel file (I'm trying to create a report based
on the data from a SQL table)?
>
Thanks!
Aug 17 '06 #5
See

http://www.kjmsolutions.com/datasetarray.htm

wreckingcru wrote:
I'm trying to output a SQL query that is constructed thru my VB.net GUI
into an excel file.

Here is the code I'm using:

'Sqlstmt is the SQL query statement
'Conn is the SQL Connection object

cmd = New SqlCommand(Sqlstmt, Conn)
datareader = cmd.ExecuteReader()
'datareader is the SQLdatareader object

Dim objexcel As Excel.Application
Dim objwkb As Workbook
Dim objwksht As Worksheet

objexcel = New Excel.Application
objwkb = objexcel.Workbooks.Add
objwksht = objwkb.ActiveSheet()

Dim cols = datareader.FieldCount()
objwksht.Range(objwksht.Cells(1, 1), objwksht.Cells(5,
cols)).CopyFromRecordset(datareader)

The line above is causing an exception, i.e., I never receive any data
in the excel sheet. I put this in a try statement to catch the
exception and it is this:

System.InvalidCastException: No such interface supported
at System.RuntimeType.ForwardCallToInvokeMember(Strin g memberName,
BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData&
msgData)
at Excel.Range.CopyFromRecordset(Object Data, Object MaxRows, Object
MaxColumns)
at WindowsApplication1.Form1.btGenReport_Click(Object sender,
EventArgs e) in C:.....\Form1.vb:line 416
I'm a complete newbie at .NET (Unix C/C++ programming background).

Can anyone advise about what I'm doing wrong? I've sort of "learnt" the
code from others, so the Range command is kinda sketchy to me.....

What other alternative ways would there be to take the "datareader"
data and put it in an excel file (I'm trying to create a report based
on the data from a SQL table)?

Thanks!
Aug 17 '06 #6
dude you kids are just flat out wrong.

Excel _DOESNT SUPPORT DATABASES_
Excel ISNT A REPORTING PLATFORM

keep your data in a database and spit on anyone that uses excel
scorpion53061 wrote:
See

http://www.kjmsolutions.com/datasetarray.htm

wreckingcru wrote:
I'm trying to output a SQL query that is constructed thru my VB.net GUI
into an excel file.

Here is the code I'm using:

'Sqlstmt is the SQL query statement
'Conn is the SQL Connection object

cmd = New SqlCommand(Sqlstmt, Conn)
datareader = cmd.ExecuteReader()
'datareader is the SQLdatareader object

Dim objexcel As Excel.Application
Dim objwkb As Workbook
Dim objwksht As Worksheet

objexcel = New Excel.Application
objwkb = objexcel.Workbooks.Add
objwksht = objwkb.ActiveSheet()

Dim cols = datareader.FieldCount()
objwksht.Range(objwksht.Cells(1, 1), objwksht.Cells(5,
cols)).CopyFromRecordset(datareader)

The line above is causing an exception, i.e., I never receive any data
in the excel sheet. I put this in a try statement to catch the
exception and it is this:

System.InvalidCastException: No such interface supported
at System.RuntimeType.ForwardCallToInvokeMember(Strin g memberName,
BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData&
msgData)
at Excel.Range.CopyFromRecordset(Object Data, Object MaxRows, Object
MaxColumns)
at WindowsApplication1.Form1.btGenReport_Click(Object sender,
EventArgs e) in C:.....\Form1.vb:line 416
I'm a complete newbie at .NET (Unix C/C++ programming background).

Can anyone advise about what I'm doing wrong? I've sort of "learnt" the
code from others, so the Range command is kinda sketchy to me.....

What other alternative ways would there be to take the "datareader"
data and put it in an excel file (I'm trying to create a report based
on the data from a SQL table)?

Thanks!
Aug 18 '06 #7
On 17 Aug 2006 22:58:51 -0700, "aa*********@gmail.com" <aa*********@gmail.comwrote:

¤ dude you kids are just flat out wrong.
¤
¤ Excel _DOESNT SUPPORT DATABASES_

Yes it does.

¤ Excel ISNT A REPORTING PLATFORM

Sure it is.
Paul
~~~~
Microsoft MVP (Visual Basic)
Aug 18 '06 #8
Thanks Paul - this clears up a lot!!
Paul Clement wrote:
On 16 Aug 2006 12:12:15 -0700, "wreckingcru" <pr*********@gmail.comwrote:

¤ I'm trying to output a SQL query that is constructed thru my VB.net GUI
¤ into an excel file.
¤
¤ Here is the code I'm using:
¤
¤ 'Sqlstmt is the SQL query statement
¤ 'Conn is the SQL Connection object
¤
¤ cmd = New SqlCommand(Sqlstmt, Conn)
¤ datareader = cmd.ExecuteReader()
¤ 'datareader is the SQLdatareader object
¤
¤ Dim objexcel As Excel.Application
¤ Dim objwkb As Workbook
¤ Dim objwksht As Worksheet
¤
¤ objexcel = New Excel.Application
¤ objwkb = objexcel.Workbooks.Add
¤ objwksht = objwkb.ActiveSheet()
¤
¤ Dim cols = datareader.FieldCount()
¤
¤
¤ objwksht.Range(objwksht.Cells(1, 1), objwksht.Cells(5,
¤ cols)).CopyFromRecordset(datareader)
¤
¤ The line above is causing an exception, i.e., I never receive any data
¤ in the excel sheet. I put this in a try statement to catch the
¤ exception and it is this:
¤
¤ System.InvalidCastException: No such interface supported
¤ at System.RuntimeType.ForwardCallToInvokeMember(Strin g memberName,
¤ BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData&
¤ msgData)
¤ at Excel.Range.CopyFromRecordset(Object Data, Object MaxRows, Object
¤ MaxColumns)
¤ at WindowsApplication1.Form1.btGenReport_Click(Object sender,
¤ EventArgs e) in C:.....\Form1.vb:line 416
¤

CopyFromRecordset only supports ADO and DAO Recordset objects. It does not support ADO.NET.

You could try doing this using straight SQL:

Dim ExcelConnection As New
System.Data.OleDb.OleDbConnection("Provider=Micros oft.Jet.OLEDB.4.0;" &_
"DataSource=" & "c:\Test
Files\ExcelWB.xls" & ";" & _
"Extended Properties=Excel
8.0;")

ExcelConnection.Open()

Dim ExcelCommand As New System.Data.OleDb.OleDbCommand("SELECT * INTO [Orders] FROM [Orders]
IN '' [ODBC;Driver={SQL Server};Server=(local);Database=Northwind;Trusted_ Connection=yes];",
ExcelConnection)

ExcelCommand.ExecuteNonQuery()
ExcelConnection.Close()
Paul
~~~~
Microsoft MVP (Visual Basic)
Aug 18 '06 #9
it doesn't even support parameters for stored procedures

i mean-- come on

excel is a disease!

spit on excel users!

-Aaron
ADP Nationalist
Paul Clement wrote:
On 17 Aug 2006 22:58:51 -0700, "aa*********@gmail.com" <aaron.kempf@gmail..comwrote:

¤ dude you kids are just flat out wrong.
¤
¤ Excel _DOESNT SUPPORT DATABASES_

Yes it does.

¤ Excel ISNT A REPORTING PLATFORM

Sure it is.
Paul
~~~~
Microsoft MVP (Visual Basic)
Aug 20 '06 #10
aaron

I usually avoid answering to diatribes like yours but couldn't resist
this time.

Firstly, you're saying that Excel isn't a reporting tool - do you know
what the OP actually wants to do with the data once it's in Excel?
Nope. So how is your comment even relevant (never mind useful). If all
you're going to do is to rant about not using Excel (when you don't
even know why it's being used) then why not just ignore the thread and
move on to something in which you CAN (or will) help.

Having seen your reply to this question I took a quick look at some of
your other replies to other posts, and to be honest, with a few
exceptions where you do appear to offer some assistance, they're all
the same (i.e. about how bad Excel is and how great databases are).

I think you need to take a step back to be honest - it's obvious from
most of your posts that you dislike Excel (to say the least) but have
you ever heard of the phrase "use the right tools for the job"? You
can, for example, use a hammer to get a screw into a bit of wood, but
the correct tool to use would be a screwdriver - just because you can
use something to do a job it doesn't automatically make it the right
tool.

There are many instances where databases are the right choice, and
there are other instances where xl/spreadsheets are the right choice
(and before you launch into *yet another* diatribe, yes, I am
conversant and use both depending on the need).

I currently have a need to do model a complex sales/stock forecast
which I *could* do in Access or SQL server at a push (not because of my
lack of experience but because, due to the complexity of the
calculations and the need to use a number of variables on a line by
line basis, it simply makes sense to use Excel).

No doubt you'll come out with something telling me how useless Excel/my
approach is (feel free - you're opinion really doesn't matter to me)
but before you do you should bear in mind that I use Access (where
appropriate), Excel (Where appropriate), SQL Server (where
appropriate), 'classic' VB (where appropriate), VB/C#.Net (Where
appropriate), PHP (where appropriate) etc etc etc - i.e. I use
whichever tool is appropriate for the specific task at hand and
therefore don't just go around slamming any tool I don't use in
preference for one I do.

Anyway, I really think you should consider whether you've got anything
helpful to say in reply to a question someone's posted before putting
your usual (Excel is so bad...) posts up - after all, if a question has
been posed it's because someone needs help, not because they're looking
for approval from you as to their choice of tool).

Martin

aa*********@gmail.com wrote:
it doesn't even support parameters for stored procedures

i mean-- come on

excel is a disease!

spit on excel users!

-Aaron
ADP Nationalist
Paul Clement wrote:
On 17 Aug 2006 22:58:51 -0700, "aa*********@gmail.com" <aa*********@gmail.comwrote:

¤ dude you kids are just flat out wrong.
¤
¤ Excel _DOESNT SUPPORT DATABASES_

Yes it does.

¤ Excel ISNT A REPORTING PLATFORM

Sure it is.


Paul
~~~~
Microsoft MVP (Visual Basic)
Aug 21 '06 #11
Pritcham,

Primary, why did you connect this message to a message from Paul?

Secondly why are you telling that Aaron message is diatribes, it adds
nothing.
His message tells enough?

Something about spreadsheets
http://en.wikipedia.org/wiki/Spreadsheet

Just my thoughts reading your reply

Cor

"Pritcham" <do******************@hotmail.comschreef in bericht
news:11**********************@74g2000cwt.googlegro ups.com...
aaron

I usually avoid answering to diatribes like yours but couldn't resist
this time.

Firstly, you're saying that Excel isn't a reporting tool - do you know
what the OP actually wants to do with the data once it's in Excel?
Nope. So how is your comment even relevant (never mind useful). If all
you're going to do is to rant about not using Excel (when you don't
even know why it's being used) then why not just ignore the thread and
move on to something in which you CAN (or will) help.

Having seen your reply to this question I took a quick look at some of
your other replies to other posts, and to be honest, with a few
exceptions where you do appear to offer some assistance, they're all
the same (i.e. about how bad Excel is and how great databases are).

I think you need to take a step back to be honest - it's obvious from
most of your posts that you dislike Excel (to say the least) but have
you ever heard of the phrase "use the right tools for the job"? You
can, for example, use a hammer to get a screw into a bit of wood, but
the correct tool to use would be a screwdriver - just because you can
use something to do a job it doesn't automatically make it the right
tool.

There are many instances where databases are the right choice, and
there are other instances where xl/spreadsheets are the right choice
(and before you launch into *yet another* diatribe, yes, I am
conversant and use both depending on the need).

I currently have a need to do model a complex sales/stock forecast
which I *could* do in Access or SQL server at a push (not because of my
lack of experience but because, due to the complexity of the
calculations and the need to use a number of variables on a line by
line basis, it simply makes sense to use Excel).

No doubt you'll come out with something telling me how useless Excel/my
approach is (feel free - you're opinion really doesn't matter to me)
but before you do you should bear in mind that I use Access (where
appropriate), Excel (Where appropriate), SQL Server (where
appropriate), 'classic' VB (where appropriate), VB/C#.Net (Where
appropriate), PHP (where appropriate) etc etc etc - i.e. I use
whichever tool is appropriate for the specific task at hand and
therefore don't just go around slamming any tool I don't use in
preference for one I do.

Anyway, I really think you should consider whether you've got anything
helpful to say in reply to a question someone's posted before putting
your usual (Excel is so bad...) posts up - after all, if a question has
been posed it's because someone needs help, not because they're looking
for approval from you as to their choice of tool).

Martin

aa*********@gmail.com wrote:
it doesn't even support parameters for stored procedures

i mean-- come on

excel is a disease!

spit on excel users!

-Aaron
ADP Nationalist
Paul Clement wrote:
On 17 Aug 2006 22:58:51 -0700, "aa*********@gmail.com"
<aa*********@gmail.comwrote:

¤ dude you kids are just flat out wrong.
¤
¤ Excel _DOESNT SUPPORT DATABASES_

Yes it does.

¤ Excel ISNT A REPORTING PLATFORM

Sure it is.
Paul
~~~~
Microsoft MVP (Visual Basic)

Aug 21 '06 #12
Cor

Firstly, my apologies, this reply was meant for Aaron, not Paul.

Secondly, I was trying to suggest that he (Aaron) post something useful
as opposed to slamming the use of Excel (having said that, I didn't
post anything of use to the OP either so again, I apologise - just got
wound up reading Aaron's reply I suppose).

Martin
Cor Ligthert [MVP] wrote:
Pritcham,

Primary, why did you connect this message to a message from Paul?

Secondly why are you telling that Aaron message is diatribes, it adds
nothing.
His message tells enough?

Something about spreadsheets
http://en.wikipedia.org/wiki/Spreadsheet

Just my thoughts reading your reply

Cor

"Pritcham" <do******************@hotmail.comschreef in bericht
news:11**********************@74g2000cwt.googlegro ups.com...
aaron

I usually avoid answering to diatribes like yours but couldn't resist
this time.

Firstly, you're saying that Excel isn't a reporting tool - do you know
what the OP actually wants to do with the data once it's in Excel?
Nope. So how is your comment even relevant (never mind useful). If all
you're going to do is to rant about not using Excel (when you don't
even know why it's being used) then why not just ignore the thread and
move on to something in which you CAN (or will) help.

Having seen your reply to this question I took a quick look at some of
your other replies to other posts, and to be honest, with a few
exceptions where you do appear to offer some assistance, they're all
the same (i.e. about how bad Excel is and how great databases are).

I think you need to take a step back to be honest - it's obvious from
most of your posts that you dislike Excel (to say the least) but have
you ever heard of the phrase "use the right tools for the job"? You
can, for example, use a hammer to get a screw into a bit of wood, but
the correct tool to use would be a screwdriver - just because you can
use something to do a job it doesn't automatically make it the right
tool.

There are many instances where databases are the right choice, and
there are other instances where xl/spreadsheets are the right choice
(and before you launch into *yet another* diatribe, yes, I am
conversant and use both depending on the need).

I currently have a need to do model a complex sales/stock forecast
which I *could* do in Access or SQL server at a push (not because of my
lack of experience but because, due to the complexity of the
calculations and the need to use a number of variables on a line by
line basis, it simply makes sense to use Excel).

No doubt you'll come out with something telling me how useless Excel/my
approach is (feel free - you're opinion really doesn't matter to me)
but before you do you should bear in mind that I use Access (where
appropriate), Excel (Where appropriate), SQL Server (where
appropriate), 'classic' VB (where appropriate), VB/C#.Net (Where
appropriate), PHP (where appropriate) etc etc etc - i.e. I use
whichever tool is appropriate for the specific task at hand and
therefore don't just go around slamming any tool I don't use in
preference for one I do.

Anyway, I really think you should consider whether you've got anything
helpful to say in reply to a question someone's posted before putting
your usual (Excel is so bad...) posts up - after all, if a question has
been posed it's because someone needs help, not because they're looking
for approval from you as to their choice of tool).

Martin

aa*********@gmail.com wrote:
it doesn't even support parameters for stored procedures

i mean-- come on

excel is a disease!

spit on excel users!

-Aaron
ADP Nationalist
Paul Clement wrote:
On 17 Aug 2006 22:58:51 -0700, "aa*********@gmail.com"
<aa*********@gmail.comwrote:
>
¤ dude you kids are just flat out wrong.
¤
¤ Excel _DOESNT SUPPORT DATABASES_
>
Yes it does.
>
¤ Excel ISNT A REPORTING PLATFORM
>
Sure it is.
>
>
Paul
~~~~
Microsoft MVP (Visual Basic)
Aug 21 '06 #13
Hi (again!)

To make up for not posting anything of real value before, here's a link
to a similar question (along with a suitable solution) for the OP's
original question - hope it helps.

http://groups.google.co.uk/group/mic...e7dd252aba4ebe
Cheers
Martin

Pritcham wrote:
Cor

Firstly, my apologies, this reply was meant for Aaron, not Paul.

Secondly, I was trying to suggest that he (Aaron) post something useful
as opposed to slamming the use of Excel (having said that, I didn't
post anything of use to the OP either so again, I apologise - just got
wound up reading Aaron's reply I suppose).

Martin
Cor Ligthert [MVP] wrote:
Pritcham,

Primary, why did you connect this message to a message from Paul?

Secondly why are you telling that Aaron message is diatribes, it adds
nothing.
His message tells enough?

Something about spreadsheets
http://en.wikipedia.org/wiki/Spreadsheet

Just my thoughts reading your reply

Cor

"Pritcham" <do******************@hotmail.comschreef in bericht
news:11**********************@74g2000cwt.googlegro ups.com...
aaron

I usually avoid answering to diatribes like yours but couldn't resist
this time.

Firstly, you're saying that Excel isn't a reporting tool - do you know
what the OP actually wants to do with the data once it's in Excel?
Nope. So how is your comment even relevant (never mind useful). If all
you're going to do is to rant about not using Excel (when you don't
even know why it's being used) then why not just ignore the thread and
move on to something in which you CAN (or will) help.

Having seen your reply to this question I took a quick look at some of
your other replies to other posts, and to be honest, with a few
exceptions where you do appear to offer some assistance, they're all
the same (i.e. about how bad Excel is and how great databases are).

I think you need to take a step back to be honest - it's obvious from
most of your posts that you dislike Excel (to say the least) but have
you ever heard of the phrase "use the right tools for the job"? You
can, for example, use a hammer to get a screw into a bit of wood, but
the correct tool to use would be a screwdriver - just because you can
use something to do a job it doesn't automatically make it the right
tool.

There are many instances where databases are the right choice, and
there are other instances where xl/spreadsheets are the right choice
(and before you launch into *yet another* diatribe, yes, I am
conversant and use both depending on the need).

I currently have a need to do model a complex sales/stock forecast
which I *could* do in Access or SQL server at a push (not because of my
lack of experience but because, due to the complexity of the
calculations and the need to use a number of variables on a line by
line basis, it simply makes sense to use Excel).

No doubt you'll come out with something telling me how useless Excel/my
approach is (feel free - you're opinion really doesn't matter to me)
but before you do you should bear in mind that I use Access (where
appropriate), Excel (Where appropriate), SQL Server (where
appropriate), 'classic' VB (where appropriate), VB/C#.Net (Where
appropriate), PHP (where appropriate) etc etc etc - i.e. I use
whichever tool is appropriate for the specific task at hand and
therefore don't just go around slamming any tool I don't use in
preference for one I do.

Anyway, I really think you should consider whether you've got anything
helpful to say in reply to a question someone's posted before putting
your usual (Excel is so bad...) posts up - after all, if a question has
been posed it's because someone needs help, not because they're looking
for approval from you as to their choice of tool).

Martin

aa*********@gmail.com wrote:
it doesn't even support parameters for stored procedures
>
i mean-- come on
>
excel is a disease!
>
spit on excel users!
>
-Aaron
ADP Nationalist
>
>
Paul Clement wrote:
On 17 Aug 2006 22:58:51 -0700, "aa*********@gmail.com"
<aa*********@gmail.comwrote:

¤ dude you kids are just flat out wrong.
¤
¤ Excel _DOESNT SUPPORT DATABASES_

Yes it does.

¤ Excel ISNT A REPORTING PLATFORM

Sure it is.


Paul
~~~~
Microsoft MVP (Visual Basic)
Aug 21 '06 #14
Aaron,

What are you trying to prove! If you don't have anything good to say
it would be better to say nothing at all. This is a support forum not
a "Soap Box".

Rob

aa*********@gmail.com wrote:
it doesn't even support parameters for stored procedures

i mean-- come on

excel is a disease!

spit on excel users!

-Aaron
ADP Nationalist
Paul Clement wrote:
On 17 Aug 2006 22:58:51 -0700, "aa*********@gmail.com" <aa*********@gmail.comwrote:

¤ dude you kids are just flat out wrong.
¤
¤ Excel _DOESNT SUPPORT DATABASES_

Yes it does.

¤ Excel ISNT A REPORTING PLATFORM

Sure it is.


Paul
~~~~
Microsoft MVP (Visual Basic)
Aug 21 '06 #15
it NEVER makes sense to use Excel for reporting.

keep your calculations in one place instead of a hundred different
copies.

it's simpler; easier; higher-performance and it's easier to manage.
I mean-- do you really want to loop through 100 copies of the same XLS
to change a single formula?

if you use sprocs instead of excel you can use custom functions; you
can use custom centralized business logic.

Excel is for babies.

SPIT on people that use it for anything.
-Aaron


Pritcham wrote:
aaron

I usually avoid answering to diatribes like yours but couldn't resist
this time.

Firstly, you're saying that Excel isn't a reporting tool - do you know
what the OP actually wants to do with the data once it's in Excel?
Nope. So how is your comment even relevant (never mind useful). If all
you're going to do is to rant about not using Excel (when you don't
even know why it's being used) then why not just ignore the thread and
move on to something in which you CAN (or will) help.

Having seen your reply to this question I took a quick look at some of
your other replies to other posts, and to be honest, with a few
exceptions where you do appear to offer some assistance, they're all
the same (i.e. about how bad Excel is and how great databases are).

I think you need to take a step back to be honest - it's obvious from
most of your posts that you dislike Excel (to say the least) but have
you ever heard of the phrase "use the right tools for the job"? You
can, for example, use a hammer to get a screw into a bit of wood, but
the correct tool to use would be a screwdriver - just because you can
use something to do a job it doesn't automatically make it the right
tool.

There are many instances where databases are the right choice, and
there are other instances where xl/spreadsheets are the right choice
(and before you launch into *yet another* diatribe, yes, I am
conversant and use both depending on the need).

I currently have a need to do model a complex sales/stock forecast
which I *could* do in Access or SQL server at a push (not because of my
lack of experience but because, due to the complexity of the
calculations and the need to use a number of variables on a line by
line basis, it simply makes sense to use Excel).

No doubt you'll come out with something telling me how useless Excel/my
approach is (feel free - you're opinion really doesn't matter to me)
but before you do you should bear in mind that I use Access (where
appropriate), Excel (Where appropriate), SQL Server (where
appropriate), 'classic' VB (where appropriate), VB/C#.Net (Where
appropriate), PHP (where appropriate) etc etc etc - i.e. I use
whichever tool is appropriate for the specific task at hand and
therefore don't just go around slamming any tool I don't use in
preference for one I do.

Anyway, I really think you should consider whether you've got anything
helpful to say in reply to a question someone's posted before putting
your usual (Excel is so bad...) posts up - after all, if a question has
been posed it's because someone needs help, not because they're looking
for approval from you as to their choice of tool).

Martin

aa*********@gmail.com wrote:
it doesn't even support parameters for stored procedures

i mean-- come on

excel is a disease!

spit on excel users!

-Aaron
ADP Nationalist
Paul Clement wrote:
On 17 Aug 2006 22:58:51 -0700, "aa*********@gmail.com" <aa*********@gmail.comwrote:
>
¤ dude you kids are just flat out wrong.
¤
¤ Excel _DOESNT SUPPORT DATABASES_
>
Yes it does.
>
¤ Excel ISNT A REPORTING PLATFORM
>
Sure it is.


Paul
~~~~
Microsoft MVP (Visual Basic)
Aug 21 '06 #16
use the right tools for the job?

EX-FRIGGIN-ACTLY

excel is NEVER the right tool for ANY job.

it is a disease.

people that use Excel -- for anything-- should be fired on the spot for
ineptitude.

-Aaron
Pritcham wrote:
aaron

I usually avoid answering to diatribes like yours but couldn't resist
this time.

Firstly, you're saying that Excel isn't a reporting tool - do you know
what the OP actually wants to do with the data once it's in Excel?
Nope. So how is your comment even relevant (never mind useful). If all
you're going to do is to rant about not using Excel (when you don't
even know why it's being used) then why not just ignore the thread and
move on to something in which you CAN (or will) help.

Having seen your reply to this question I took a quick look at some of
your other replies to other posts, and to be honest, with a few
exceptions where you do appear to offer some assistance, they're all
the same (i.e. about how bad Excel is and how great databases are).

I think you need to take a step back to be honest - it's obvious from
most of your posts that you dislike Excel (to say the least) but have
you ever heard of the phrase "use the right tools for the job"? You
can, for example, use a hammer to get a screw into a bit of wood, but
the correct tool to use would be a screwdriver - just because you can
use something to do a job it doesn't automatically make it the right
tool.

There are many instances where databases are the right choice, and
there are other instances where xl/spreadsheets are the right choice
(and before you launch into *yet another* diatribe, yes, I am
conversant and use both depending on the need).

I currently have a need to do model a complex sales/stock forecast
which I *could* do in Access or SQL server at a push (not because of my
lack of experience but because, due to the complexity of the
calculations and the need to use a number of variables on a line by
line basis, it simply makes sense to use Excel).

No doubt you'll come out with something telling me how useless Excel/my
approach is (feel free - you're opinion really doesn't matter to me)
but before you do you should bear in mind that I use Access (where
appropriate), Excel (Where appropriate), SQL Server (where
appropriate), 'classic' VB (where appropriate), VB/C#.Net (Where
appropriate), PHP (where appropriate) etc etc etc - i.e. I use
whichever tool is appropriate for the specific task at hand and
therefore don't just go around slamming any tool I don't use in
preference for one I do.

Anyway, I really think you should consider whether you've got anything
helpful to say in reply to a question someone's posted before putting
your usual (Excel is so bad...) posts up - after all, if a question has
been posed it's because someone needs help, not because they're looking
for approval from you as to their choice of tool).

Martin

aa*********@gmail.com wrote:
it doesn't even support parameters for stored procedures

i mean-- come on

excel is a disease!

spit on excel users!

-Aaron
ADP Nationalist
Paul Clement wrote:
On 17 Aug 2006 22:58:51 -0700, "aa*********@gmail.com" <aa*********@gmail.comwrote:
>
¤ dude you kids are just flat out wrong.
¤
¤ Excel _DOESNT SUPPORT DATABASES_
>
Yes it does.
>
¤ Excel ISNT A REPORTING PLATFORM
>
Sure it is.


Paul
~~~~
Microsoft MVP (Visual Basic)
Aug 21 '06 #17
yes I know what he wants to do.

he wants to have an unmanageable MESS to create job security.

you can't hold your company hostage my developing 'solutions' (gag)
with Excel that are too complex for the task at hand.

keep one copy of the same calculations; and it's a lot easier to
manage.
decentralizing spreadsheets are a MAJOR problem facing IT departments
everywhere.

it's just a question of whether you kids have THE BALLS to do something
about it.

Use Crystal Reports or Reporting Services.
or Eat Shit.

-Aaron
Cor Ligthert [MVP] wrote:
Pritcham,

Primary, why did you connect this message to a message from Paul?

Secondly why are you telling that Aaron message is diatribes, it adds
nothing.
His message tells enough?

Something about spreadsheets
http://en.wikipedia.org/wiki/Spreadsheet

Just my thoughts reading your reply

Cor

"Pritcham" <do******************@hotmail.comschreef in bericht
news:11**********************@74g2000cwt.googlegro ups.com...
aaron

I usually avoid answering to diatribes like yours but couldn't resist
this time.

Firstly, you're saying that Excel isn't a reporting tool - do you know
what the OP actually wants to do with the data once it's in Excel?
Nope. So how is your comment even relevant (never mind useful). If all
you're going to do is to rant about not using Excel (when you don't
even know why it's being used) then why not just ignore the thread and
move on to something in which you CAN (or will) help.

Having seen your reply to this question I took a quick look at some of
your other replies to other posts, and to be honest, with a few
exceptions where you do appear to offer some assistance, they're all
the same (i.e. about how bad Excel is and how great databases are).

I think you need to take a step back to be honest - it's obvious from
most of your posts that you dislike Excel (to say the least) but have
you ever heard of the phrase "use the right tools for the job"? You
can, for example, use a hammer to get a screw into a bit of wood, but
the correct tool to use would be a screwdriver - just because you can
use something to do a job it doesn't automatically make it the right
tool.

There are many instances where databases are the right choice, and
there are other instances where xl/spreadsheets are the right choice
(and before you launch into *yet another* diatribe, yes, I am
conversant and use both depending on the need).

I currently have a need to do model a complex sales/stock forecast
which I *could* do in Access or SQL server at a push (not because of my
lack of experience but because, due to the complexity of the
calculations and the need to use a number of variables on a line by
line basis, it simply makes sense to use Excel).

No doubt you'll come out with something telling me how useless Excel/my
approach is (feel free - you're opinion really doesn't matter to me)
but before you do you should bear in mind that I use Access (where
appropriate), Excel (Where appropriate), SQL Server (where
appropriate), 'classic' VB (where appropriate), VB/C#.Net (Where
appropriate), PHP (where appropriate) etc etc etc - i.e. I use
whichever tool is appropriate for the specific task at hand and
therefore don't just go around slamming any tool I don't use in
preference for one I do.

Anyway, I really think you should consider whether you've got anything
helpful to say in reply to a question someone's posted before putting
your usual (Excel is so bad...) posts up - after all, if a question has
been posed it's because someone needs help, not because they're looking
for approval from you as to their choice of tool).

Martin

aa*********@gmail.com wrote:
it doesn't even support parameters for stored procedures

i mean-- come on

excel is a disease!

spit on excel users!

-Aaron
ADP Nationalist
Paul Clement wrote:
On 17 Aug 2006 22:58:51 -0700, "aa*********@gmail.com"
<aa*********@gmail.comwrote:
>
¤ dude you kids are just flat out wrong.
¤
¤ Excel _DOESNT SUPPORT DATABASES_
>
Yes it does.
>
¤ Excel ISNT A REPORTING PLATFORM
>
Sure it is.
>
>
Paul
~~~~
Microsoft MVP (Visual Basic)
Aug 21 '06 #18
this isn't a support forum.

this isn't a soap box.

i'm here to tell you that the idea of creatign a dozen spreadsheets to
create a simple report?
it's just not necessary.

if you MUST pull data out of a database into a spreadsheet; then you
should be using Analysis Services and PivotTables.

but my webbased pivotTables are more powerful; i mean-- if multiple
people VIEW the same report at the same time; there isn't an issue.

having a different copy of the report in 100 different places; where
every single end user can change a single function?

it's just not an enterprise level solution.

Excel is a speedbump; drive around it.

-Aaron

Rob Panosh wrote:
Aaron,

What are you trying to prove! If you don't have anything good to say
it would be better to say nothing at all. This is a support forum not
a "Soap Box".

Rob

aa*********@gmail.com wrote:
it doesn't even support parameters for stored procedures

i mean-- come on

excel is a disease!

spit on excel users!

-Aaron
ADP Nationalist
Paul Clement wrote:
On 17 Aug 2006 22:58:51 -0700, "aa*********@gmail.com" <aa*********@gmail.comwrote:
>
¤ dude you kids are just flat out wrong.
¤
¤ Excel _DOESNT SUPPORT DATABASES_
>
Yes it does.
>
¤ Excel ISNT A REPORTING PLATFORM
>
Sure it is.


Paul
~~~~
Microsoft MVP (Visual Basic)
Aug 21 '06 #19
LOL and that for all your messages in this thread
<aa*********@gmail.comschreef in bericht
news:11*********************@74g2000cwt.googlegrou ps.com...
this isn't a support forum.

this isn't a soap box.

i'm here to tell you that the idea of creatign a dozen spreadsheets to
create a simple report?
it's just not necessary.

if you MUST pull data out of a database into a spreadsheet; then you
should be using Analysis Services and PivotTables.

but my webbased pivotTables are more powerful; i mean-- if multiple
people VIEW the same report at the same time; there isn't an issue.

having a different copy of the report in 100 different places; where
every single end user can change a single function?

it's just not an enterprise level solution.

Excel is a speedbump; drive around it.

-Aaron

Rob Panosh wrote:
Aaron,

What are you trying to prove! If you don't have anything good to say
it would be better to say nothing at all. This is a support forum not
a "Soap Box".

Rob

aa*********@gmail.com wrote:
it doesn't even support parameters for stored procedures

i mean-- come on

excel is a disease!

spit on excel users!

-Aaron
ADP Nationalist
Paul Clement wrote:
On 17 Aug 2006 22:58:51 -0700, "aa*********@gmail.com"
<aa*********@gmail.comwrote:
>
¤ dude you kids are just flat out wrong.
¤
¤ Excel _DOESNT SUPPORT DATABASES_
>
Yes it does.
>
¤ Excel ISNT A REPORTING PLATFORM
>
Sure it is.
>
>
Paul
~~~~
Microsoft MVP (Visual Basic)

Aug 21 '06 #20

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

Similar topics

9
by: netpurpose | last post by:
I need to extract data from this table to find the lowest prices of each product as of today. The product will be listed/grouped by the name only, discarding the product code - I use...
5
by: deko | last post by:
How to run action query against linked table? I have an Access 2003 mdb with an Excel 2003 Workbook as a linked table. When I attempt to run an action query against the linked table I get this...
0
by: Mike Knight | last post by:
(I've also posted this problem on microsoft.public.excel.programming) I have a MS Access 2003 Database named "AS400 Fields.mdb". This database contains links to tables on an AS400. In MS...
2
by: aland | last post by:
I've got an Excel spread sheet with one row of id's and I'd like to use these in a query and put the results into Excel. Basically I'd like to do something like SELECT txtFileTitle, txtFileYear...
3
by: Blue Bell Trading - Customer Services | last post by:
Hi, I need to export all data that was despatched on a specified date to an excel file. I tried creating a query but I am stuck? Thanks...
1
by: Suffrinmick | last post by:
Hello Everyone I've built a database using Access 2000 which includes a query which is built using a form containing filters. No problem. When I export the results of the query to excel, (File >...
5
by: Simon | last post by:
Dear reader, With the export command you can export a query to Excel. By activate this command a form pop's up with the following text:
2
by: =?Utf-8?B?UmljaA==?= | last post by:
Hello, I created a simple dll in VB2005 to use ADO.Net -- oleDBDataAdapter to write data to an Excel file. The code (below) works fine from an Excel file (invoke the dll from Excel to write to...
1
by: CoolFactor | last post by:
MY CODE IS NEAR THE BOTTOM I want to export this Access query into Excel using a command button on an Access form in the following way I describe below. Below you will find the simple query I am...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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,...
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...

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.