473,748 Members | 4,178 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2982
On 1 Ott, 16:40, laurasesm...@gm ail.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.Connectio n
dim cat as ADOX.Catalog
dim tbl as ADOX.Table

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

Set cat = New ADOX.Catalog 'get the Catalog Information connected
up
cat.ActiveConne ction = 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**********@g mail.comwrote in message
news:11******** **************@ 22g2000hsm.goog legroups.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
35559
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 and extract information from specific worksheets and cells. I'm not really sure how to get started with this process. I ran the COM Makepy utility from my PythonWin (IDE from ActiveSTate),
0
2838
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 user to key in a password into an input box, the password is compared to a a partciular cell on a hidden (xlVeryHidden) sheet and if it matches the Workbooks opens. I have not used the usual Excel password protection as I need to provide for several...
12
3222
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 left running until my application closes. I have tried setting my Excel.Application object to Nothing. I have tried to then fore the GC into action using:
3
3756
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 on the number of rows/columns in the datagrid, it can be extremely slow (several minutes to populate a 1000x50 spreadsheet). That is understandable, looking at the number of steps to copy over just one row.
3
9924
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 (SP1) installed. The error is: System.Runtime.InteropServices.COMException(0x800A03EC): Exception from HRESULT: 0x800A03EC. at Microsoft.Office.Interop.Excel._Worksheet.Paste(Object Destination, Object Link) at...
0
3441
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. When the user clicks on the Export to Excel button next to datagrid, it opens a popup with options Open, Save and Cancel. When I click open, it opens the excel sheet with the sheet name as .xls and the excel filename as temp.xls. As a result when...
3
4843
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 when the code highlighted below is used. can someone help me identify what object remains open and how to release that reference? thanks using Excel = Microsoft.Office.Interop.Excel;
0
1732
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 my new excel sheet has more number of sheets/charts it is not saving properly and it is getting handle to the already existed Excel sheet. If my new excel sheet has only 1 sheet in side it is saving properly. my $Excel =...
2
6413
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 method.... it creates 6 sheets # region Namespaces using System;
0
8987
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8826
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9534
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9316
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9241
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6793
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6073
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3303
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 we have to send another system
3
2211
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.