Good morning everybody,
I have an ACCESS project, in which I was expotring some tables as TXT files to be used as input for some MATLAB code. Until now, these tables were "static" - means the number of columns and the column names were always the same for a given table. I was using then short exporting modules (example of code below) that I wrote for each table after saving the Export Specification for each table in the Export wizzard. Everything was working smoothly, but now I have one table, which is created by the user based on his selection of several fields. This means I have a table to export, which still has a same name but in which the number of fields and their names change everytime the routine is ran. The exporting module does not work anymore since the Export Specification is not the same anymore (I guess this is the problem...). Is there any way to circumvent this?
Thanks in advance for any suggestion,
Marcin - Function TXTsendTblGlobFactorFinLev()
-
DoCmd.TransferText transfertype:=acExportDelim, _
-
specificationname:="GlobFactorFinLev Export Specification", _
-
TableName:="GlobFactorFinLev", _
-
Filename:="C:\MATLAB\DB\GlobFactorFinLev.txt", _
-
hasfieldnames:=True
-
End Function
Not straightforwardly no.
I wouldn't like to take you through a process of amending stored Import/Export specs, assuming that would even work.
It's not something supported by Access natively.
9 1682 NeoPa 32,556
Expert Mod 16PB
Not straightforwardly no.
I wouldn't like to take you through a process of amending stored Import/Export specs, assuming that would even work.
It's not something supported by Access natively.
Thanks NeoPa.
Well, I will have to do it manually I guess...It's not such a big deal, since I have only one special table to export.
Thanks again,
Marcin
NeoPa 32,556
Expert Mod 16PB
Sorry the answer was not more hopeful.
Hi NeoPa,
I think I found the way to do it. It's a little tricky but should work fine. I can export any table (with no export specs) to TXT file using DoCmd.OutputTo. The problem is that the resulting txt file has some sort of "lines" from the ACCESS table. But I think, I will be able to elminate these "lines" with a short code written in MATLAB.
What about that?
M.
NeoPa 32,556
Expert Mod 16PB
I didn't get any lines in my test, and I don't know what MATLAB is, but it sounds like you have a very workable solution there if you can do that. Well done.
Hey,
Attached is an example of how my file looks like if it is exported with DoCmd.OutputTo. But I think I will get it clean after MATLAB treatment...
M. - ------------------------------------------------------------------------------------------
-
| Barcode | Descr | Item_Price | Inv_Qty |
-
------------------------------------------------------------------------------------------
-
| 100001 | LEAD ROOF | $11.00 | 990 |
-
------------------------------------------------------------------------------------------
-
| 100004 | W/M CPVC W/AIR CHAMBERS | $22.00 | 980 |
-
------------------------------------------------------------------------------------------
-
| 100005 | W/M PEX W/AIR CHAMBERS | $1.00 | 990 |
-
------------------------------------------------------------------------------------------
-
| 100006 | ICE CPVC W/AIR CHAMBER | $2.00 | 970 |
-
------------------------------------------------------------------------------------------
-
| 100007 | ICE COPPER W/AIR CHAMBER | $3.00 | 990 |
-
------------------------------------------------------------------------------------------
-
| 100008 | STUD 2-H FOR WOOD | $4.00 | 980 |
-
------------------------------------------------------------------------------------------
-
| 100010 | STRAINERS 2-3 ALL PURPOSE | $6.00 | 990 |
-
------------------------------------------------------------------------------------------
-
| 100011 | 2-H MICKEY | $7.00 | 977 |
-
------------------------------------------------------------------------------------------
-
| 100012 | STOUT BRACKET 10-18 SPAN | $8.00 | 990 |
-
------------------------------------------------------------------------------------------
-
| 100013 | 2-H STRAIGHT | $9.00 | 990 |
-
------------------------------------------------------------------------------------------
-
| 100014 | 0630-C2814 H/B COPPER | $11.00 | 990 |
-
------------------------------------------------------------------------------------------
-
| 100015 | 15X60 PROTECTIVE LINER | $4.90 | 990 |
-
------------------------------------------------------------------------------------------
-
| 100016 | LH CAST IRON VILLAG 60X30 | $264.60 | 990 |
-
------------------------------------------------------------------------------------------
By the way, MTLAB is a pretty powerful software for mathematics/physics/ingeneering applications.
Here is their website: http://www.mathworks.com
Marcin
NeoPa 32,556
Expert Mod 16PB @mabrynda
Sounds like a good idea Marcin :)
If MATLAB will accept it, you can use VBA Code to Export the Data contained in your Table to a Delimited Text File. Neither the Number of Fields nor their Names would matter, since this info can be easily extracted from the Recordset created from the Table to do the actual Export. I won't even attempt this unless I know that a Delimited Format will be acceptable by MATLAB. A Fixed-Width Format could also be generated but would be more complicated. Just let me know.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: JJ |
last post by:
Hi,
usually, I'm not using MS servers, but I have a big problem with a
Access table.
I should create a web application for a Historical Dipartment.
They have created a populated a Access...
|
by: Pecanfan |
last post by:
Hi,
I'm trying to come up with a way of generating 'warning' e-mails based on
specific criteria within an Access (2003) database. I've decided to do this
by exporting specific information to a...
|
by: Neil |
last post by:
Hi guyz, just trying out this google feature so if i post if in the
wrong area i appologize. now to my question. BTW i'm new to access
programming, i've done a little vb6.0 and vb.net but access...
|
by: alexandre.brisebois |
last post by:
Hi, I am using access 2003, I would like to know if there is an option
to reorganize the tables in a maner that is readable, as we can do in
sql sever 2000 or 2005.
I have been given a database...
|
by: Daniel Wetzler |
last post by:
Dear MSSQL- experts,
I have a strange problem with SQLSERVER 2000.
I tried to export a table of about 40000 lines into a text file using
the Enterprise manager
export assitant. I was astonished...
|
by: smaczylo |
last post by:
Hello, I've recently been asked to work with Microsoft Access, and
while I feel quite comfortable with Excel, I'm at a complete loss with
databases. If someone could help me with this issue I'm...
|
by: tasmontique |
last post by:
I am working on an access 2002 flight schedule database. I am new to access but have some basic understanding of sql and vb6 code.
I have learned a lot from this website. Thanks much
Hopefully...
|
by: NEWSGROUPS |
last post by:
I have data in a table in an Access 2000 database that needs to be exported
to a formatted text file. For instance, the first field is an account number
that is formatted in the table as text and...
|
by: bhodgins |
last post by:
Hi,
I am new on here, and had a newbie question that I am stumped with.
I am not new to access, but am new to VB.
I am trying to export BLOBs from a field called photo to external jpeg files. I...
|
by: Edward Reid |
last post by:
OK, I've been watching my DB grow and have known for a long time I
would have to move the back end, but of course I waited until I
started getting odd behavior (at about 1.92GB). So today I...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
|
by: ryjfgjl |
last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
|
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,...
|
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...
|
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...
|
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...
|
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...
| |