473,408 Members | 2,734 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,408 software developers and data experts.

Change the Input Excel sheet

I've got a convertion tool with Access 2003. It imports an excel sheet
into the data base and with the records in it
creats different outputfiles. Its programmed with VBA.
Now what I need is, in some cases, to change the excel sheet that we
import. How should I do that? If anyone can give me an advise it would
be great. Thank you.

Oct 1 '07 #1
4 2962
On 1 Ott, 16:40, laurasesm...@gmail.com wrote:
I've got a convertion tool with Access 2003. It imports an excel sheet
into the data base and with the records in it
creats different outputfiles. Its programmed with VBA.
Now what I need is, in some cases, to change the excel sheet that we
import. How should I do that? If anyone can give me an advise it would
be great. Thank you.
This free tool allows you to change at will
the sheet to import. You can also
make any union or joins of different sheets, even belonging
to different Excel files. Or joining an excel sheet with an access
table.
http://www.datatime.eu/download.aspx

If you have problem can write directly to me.
-P

Oct 1 '07 #2
Hi Laura,

It is easy to get the 'table names' from an excel sheet if you are
using ADO code:

dim cnn as ADODB.Connection
dim cat as ADOX.Catalog
dim tbl as ADOX.Table

SET cnn = NEW ADODB.Connection
With cnn 'FileName is the name of the file you want to open
[String]
.Provider = "Microsoft.Jet.OLEDB.4.0"
.ConnectionString = "Data Source = " & FileName & "; Extended
Properties = Excel 8.0;"
.Open
End With

Set cat = New ADOX.Catalog 'get the Catalog Information connected
up
cat.ActiveConnection = cnn

for each tbl in cat.Tables
debug.print tbl.Name
next

set cat = Nothing
cnn.Close
set cnn = Nothing

You can also get to the field names and definitions for each table by
using the ADOX.Column data type for a variable and iterating through
the 'columns' for each table.

Named ranges will also show up using this method, but not Dynamic
Named Ranges. Sometimes Excel will also give a sheetname with a "_"
character or a "$" character at the start - I usually just filter
these out with a simple if statement if I want to make a list of the
available tables and named ranges.

I hope this helps

Cheers

The Frog

Oct 2 '07 #3
<la**********@gmail.comwrote in message
news:11**********************@22g2000hsm.googlegro ups.com...
I've got a convertion tool with Access 2003. It imports an excel sheet
into the data base and with the records in it
creats different outputfiles. Its programmed with VBA.
Now what I need is, in some cases, to change the excel sheet that we
import. How should I do that? If anyone can give me an advise it would
be great. Thank you.
Use this:

http://support.microsoft.com/kb/288543

Keith.
www.keithwilby.com

Oct 2 '07 #4
Thank you all for your help. With all the information I've got now,
I'm going to try to do it.
If I have any specific problems I will tell you.
Thank you again,

Laura

Oct 2 '07 #5

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

Similar topics

13
by: Allison Bailey | last post by:
Hi Folks, I'm a brand new Python programmer, so please point me in the right direction if this is not the best forum for this question.... I would like to open an existing MS Excel spreadsheet...
0
by: Jack | last post by:
Windows 2K Pro Access/Excel 2003 Hi there, I have a large number of password protected Excel Workbooks. The files are protected by code that runs when the workbook opens. The code asks the...
12
by: elziko | last post by:
I'm using late binding (I must) to automate Excel. My code opens Excel after createing and poulating some sheets. My problem is that when the user finally decides to close Excel its process is...
3
by: | last post by:
Hello, I have a routine in my Windows application that exports the contents of a datagrid to Excel. It is modeled closely after the HowTo example on MSDN: http://tinyurl.com/5g2jm. Depending...
3
by: | last post by:
I wrote a class in VB.NET to export the contents of a datagrid to Excel. It works perfectly on my machine, but it fails on my customers' PCs that have identical versions of Win XP (SP1) and Excel...
0
by: Sridhar | last post by:
Hi, I am having trouble renaming the excel sheet while exporting to excel. we have a datagrid that contains some analytical data. I have the name to the excel file as "temp.xls" inside the code....
3
by: pleaseexplaintome_2 | last post by:
using the code below (some parts not included), I create a new excel workbook with spreadheets. I then want to delete a spreadsheet, but a reference remains open and excel stays in task manager...
0
by: rajeshkothuru | last post by:
Hi I am new to perl programming, i stcked at one line. I have written code such that new excel sheet will save accordingly even though if already existed Excel sheet persists. The problem is if...
2
hemantbasva
by: hemantbasva | last post by:
Note We need to have a template on server for generating report in multiple sheet as we do not had msoffice on server moreover this require a batch job to delete excel file created by 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
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
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
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
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
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...

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.