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

Can you use datasets in an Excel macro?

CR
Is there a way to use datasets in an Excel VBA macro? I currently use
ADO but I have to make sure all the client PC's have ADO installed.
Now that I'm switching all of my VB6 programs to .NET, I'd like to
convert all my macros as well.

Chuck.
Nov 20 '05 #1
3 5298
Hi CR,

I do not know, however a XML dataset is a (very simple) XML file.

So basicly nothing more than a XML file with tags, so why would you not be
able to use that in a macro in Excel.

However, I do not know that.

But I think that you can ask that in an excel newsgroup.

I hope anyhow that this helps a little bit?

Cor
Nov 20 '05 #2
Depends on the version and even then, you can do it if you really want to
although it won't be fun. If you are running XP, there's an XML section
under Data. In the old days you'd use Data - Import External Data, New
Database Query.. Now you can go straight to XML and Import XML. You'll need
to add the serialized dataset to the Maps, but then it's good to go. This
may seem like a pain, but on a 1 to 10 it's a 2. All you need to do is use
DataSet.WriteXML("Path:\File.xml") Since you know where you wrote it, you
can tell Excel to look there. XP also has some other pretty wild stuff and
you can hit SharePoint or SqlServer and depending on access and return
types, you can hit a web service too (but there are a lot of 'but's' here so
let me not get too far ahead of myself).

You can also use com interop to write your DS to an excel sheet, but my
experience has been that it's quite slow compared to running straight
macros.

I know I answered this in general terms, If you need any code or have any
specific questions, please let me know

HTH,

Bill
"CR" <cr***@hotmail.com> wrote in message
news:1a**************************@posting.google.c om...
Is there a way to use datasets in an Excel VBA macro? I currently use
ADO but I have to make sure all the client PC's have ADO installed.
Now that I'm switching all of my VB6 programs to .NET, I'd like to
convert all my macros as well.

Chuck.

Nov 20 '05 #3
CR
"William Ryan eMVP" <bi**@NoSp4m.devbuzz.com> wrote in message news:<uz**************@TK2MSFTNGP10.phx.gbl>...

I think I'll just wait until mirosoft comes out with office products
that are fully integrated with .NET. I've heard that they will.

Thanks!

Depends on the version and even then, you can do it if you really want to
although it won't be fun. If you are running XP, there's an XML section
under Data. In the old days you'd use Data - Import External Data, New
Database Query.. Now you can go straight to XML and Import XML. You'll need
to add the serialized dataset to the Maps, but then it's good to go. This
may seem like a pain, but on a 1 to 10 it's a 2. All you need to do is use
DataSet.WriteXML("Path:\File.xml") Since you know where you wrote it, you
can tell Excel to look there. XP also has some other pretty wild stuff and
you can hit SharePoint or SqlServer and depending on access and return
types, you can hit a web service too (but there are a lot of 'but's' here so
let me not get too far ahead of myself).

You can also use com interop to write your DS to an excel sheet, but my
experience has been that it's quite slow compared to running straight
macros.

I know I answered this in general terms, If you need any code or have any
specific questions, please let me know

HTH,

Bill
"CR" <cr***@hotmail.com> wrote in message
news:1a**************************@posting.google.c om...
Is there a way to use datasets in an Excel VBA macro? I currently use
ADO but I have to make sure all the client PC's have ADO installed.
Now that I'm switching all of my VB6 programs to .NET, I'd like to
convert all my macros as well.

Chuck.

Nov 20 '05 #4

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

Similar topics

2
by: Mrs Howl | last post by:
I don't know if there's even a way to do what I want. I click on a button in an Access form, and it opens an instance of Excel, and opens a workbook and runs a macro that's in it. So far, fine,...
1
by: Steven Stewart | last post by:
I have a user who has been using Excel for a while to keep statistics and print reports. She finds using it cumbersome because of long formulas and a lot of copying and pasting. I have designed...
8
by: Nick M | last post by:
Hello All, Excellent info here Thanks! I am very new to using access in general and I am on a learning curve. I'm trying to import an excel workbook (with worksheets) into an access db via a...
2
by: codejockey | last post by:
I have a simple project that requires I take a set of data from an Excel spreadsheet, compare it to a table in SQL Server (where column names match), and if there are changes in the Excel sheet,...
0
by: codejockey | last post by:
Please forgive the repost, but I'm trying to avoid the hack I want to implement since I cant get this sample to work. Can anyone help? *********************** William: Thanks for the reply. I...
0
by: Rich Wallace | last post by:
Hello all, Looking for suggestions and tips if possible. I have an application running on a file server that utilizes the FileSystemWatcher to trap when any Excel files are saved by a user. I...
4
by: michael.pearmain | last post by:
Hi Experts, Looking for a very quick bit on of advice on how to make some python code run. I'm a newbie to both VBA and Python, so i apologise if this is very easy but i'm about to tear my hair...
2
by: Senthil | last post by:
Hi All I need to create an Excel report and create a command button and have to run a macro on the click event that will print all the pages in the Excel workbook. I am able to create the report...
7
by: Holger Fitschen | last post by:
Hi to all, I want to use the Excel solver in a VB.Net project. The macro Sub Makro1Solver() Application.Run "Solver.xla!Auto_Open" SolverReset Worksheets(1).Select...
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
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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
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
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...

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.