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

importing of hierarchical text files

Hello.
I need to import (or link to) some SAP R/3 report exported to a .txt file,
for further processing.
The problem is that the file is not normalized. Instead of columns and rows,
it has hierarchical nesting of data.
This is the begining of the file that consists of header and data for two
products.

30.01.2007 Proizvedena količina
1
----------------------------------------------------------------------------------------------------
_ Materijal
Fakt.potvrđivanja
_ Ostvareno
_ Planirano %
odstupanja
----------------------------------------------------------------------------------------------------

------------------------------------------------------------------------------------------

1903721 ZUMZ. SUPER BLUE PLUS ZU CR06 511
164.996,000 KOM 564.364,04 HRK
------------------------------------------------------------------------------------------
700540 ETIK.SAMOLJ.U KOL.70X70 M
14,681 TKO 440,46 HRK
4,64 %
14,029 TKO 420,91 HRK
------------------------------------------------------------------------------------------
744964 PALETNI PODLOŽAK 5 SL.LJE
140,000 KOM 389,20 HRK
3,98 %
134,640 KOM 374,31 HRK
------------------------------------------------------------------------------------------
745395 FOL.STRETCH(500x0,023mm)s
34,900 KG 358,25 HRK
3,65 %
33,664 KG 345,62 HRK
------------------------------------------------------------------------------------------
795911 TUBA AL.LAM.ZUMZ. SUPER W
167,368 TKO 97.009,98 HRK
0,55- %
168,300 TKO 97.544,38 HRK
------------------------------------------------------------------------------------------
795912 KUTIJA ZUMZENTA SUPER BLUE
167,330 TKO 96.904,86 HRK
0,58- %
168,300 TKO 97.466,38 HRK
------------------------------------------------------------------------------------------
795913 FOLIJA PP DEBLJINE 25, ŠI
108,900 KG 2.363,01 HRK
1,06 %
107,746 KG 2.338,12 HRK
------------------------------------------------------------------------------------------
795914 KUTNI ELEMENT 1010 X 140
247,000 KOM 111,15 HRK
2,16- %
252,449 KOM 113,60 HRK
------------------------------------------------------------------------------------------
795980 RIBON AW1 83 X 300
3,500 KOM 276,87 HRK
100,00 %
0,000 KOM 0,00 HRK
------------------------------------------------------------------------------------------
895085 ZUMZENTA SUPER BLUE ZUB
22.581,000 KG 186.162,56 HRK
0,51 %
22.467,466 KG 185.224,44 HRK
------------------------------------------------------------------------------------------

------------------------------------------------------------------------------------------

1902504 TRAMBAL MAZILO WATER&SKY CR06 511
296.376,000 KOM 738.671,52 HRK
------------------------------------------------------------------------------------------
700540 ETIK.SAMOLJ.U KOL.70X70 M
12,442 TKO 373,29 HRK
2,43- %
12,751 TKO 382,57 HRK
------------------------------------------------------------------------------------------
745395 FOL.STRETCH(500x0,023mm)s
28,600 KG 294,69 HRK
4,83 %
27,271 KG 281,10 HRK
------------------------------------------------------------------------------------------
795513 HILZA TRAMBAL MAZILO WATER
299,270 TKO 141.987,54 HRK
1,00- %
302,309 TKO 143.416,51 HRK
------------------------------------------------------------------------------------------
795514 KAPA ZA HILZU STICK ZA US
296,400 TKO 50.388,00 HRK
1,95- %
302,309 TKO 51.392,52 HRK
------------------------------------------------------------------------------------------
795639 KUTNI ELEMENT 5 SL. 1350*
209,200 KOM 129,70 HRK
6,25- %
223,164 KOM 138,35 HRK
------------------------------------------------------------------------------------------
795640 PRIREZ MEĐUREDNI 2 SL. 12
174,000 KOM 783,00 HRK
4,07- %
181,385 KOM 816,24 HRK
------------------------------------------------------------------------------------------
795665 ZBIRNA KUT. 248X163X120 +
12.490,000 KOM 13.836,28 HRK
0,91- %
12.606,063 KOM 13.963,84 HRK
------------------------------------------------------------------------------------------
795753 BLISTER MAZILO WATER&SKY
297,440 TKO 50.664,45 HRK
1,62- %
302,309 TKO 51.496,40 HRK
------------------------------------------------------------------------------------------
795754 BLISTER MAZILO WATER&SKY
299,100 TKO 23.965,34 HRK
1,06- %
302,309 TKO 24.221,86 HRK
------------------------------------------------------------------------------------------
795980 RIBON AW1 83 X 300
2,830 KOM 228,75 HRK
100,00 %
0,000 KOM 0,00 HRK
------------------------------------------------------------------------------------------
895080 TRAMBAL MAZILO WATER & SKY
1.377,000 KG 95.740,92 HRK
6,08- %
1.466,176 KG 101.943,41 HRK
------------------------------------------------------------------------------------------

How to normalize such data before and/or after importing to MS Access? How
to process such data in Access?

Thanks in advance,

Zlatko
Jan 30 '07 #1
2 1692
The only option I can think of right off the bat is if you can get those
text files in xml format. Then you can easily import the xml file into
access.

Rich

*** Sent via Developersdex http://www.developersdex.com ***
Jan 30 '07 #2
If that is the ony format you can use then you'll hav to use File I/O
operations to read the data in and manipulate it. This is not for the faint
hearted so if there is a posibility of getting it into a more standard ormat
then kick and scream until you get it.

If you end up having to use File I/O look up keywords such as Open,
FreeFile, Get, Input# in VBA help.

--

Terry Kreft
"tatamata" <zl***********@sb.t-com.hrwrote in message
news:ep**********@sopnews1.vipnet.hr...
Hello.
I need to import (or link to) some SAP R/3 report exported to a .txt file,
for further processing.
The problem is that the file is not normalized. Instead of columns and
rows,
it has hierarchical nesting of data.
This is the begining of the file that consists of header and data for two
products.

30.01.2007 Proizvedena količina
1
--------------------------------------------------------------------------
--------------------------
_ Materijal
Fakt.potvrđivanja
_ Ostvareno
_ Planirano
%
odstupanja
--------------------------------------------------------------------------
--------------------------
>
--------------------------------------------------------------------------
----------------
>
1903721 ZUMZ. SUPER BLUE PLUS ZU CR06 511
164.996,000 KOM 564.364,04 HRK
--------------------------------------------------------------------------
----------------
700540 ETIK.SAMOLJ.U KOL.70X70 M
14,681 TKO 440,46 HRK
4,64 %
14,029 TKO 420,91 HRK
--------------------------------------------------------------------------
----------------
744964 PALETNI PODLOŽAK 5 SL.LJE
140,000 KOM 389,20 HRK
3,98 %
134,640 KOM 374,31 HRK
--------------------------------------------------------------------------
----------------
745395 FOL.STRETCH(500x0,023mm)s
34,900 KG 358,25 HRK
3,65 %
33,664 KG 345,62 HRK
--------------------------------------------------------------------------
----------------
795911 TUBA AL.LAM.ZUMZ. SUPER W
167,368 TKO 97.009,98 HRK
0,55- %
168,300 TKO 97.544,38 HRK
--------------------------------------------------------------------------
----------------
795912 KUTIJA ZUMZENTA SUPER BLUE
167,330 TKO 96.904,86 HRK
0,58- %
168,300 TKO 97.466,38 HRK
--------------------------------------------------------------------------
----------------
795913 FOLIJA PP DEBLJINE 25, ŠI
108,900 KG 2.363,01 HRK
1,06 %
107,746 KG 2.338,12 HRK
--------------------------------------------------------------------------
----------------
795914 KUTNI ELEMENT 1010 X 140
247,000 KOM 111,15 HRK
2,16- %
252,449 KOM 113,60 HRK
--------------------------------------------------------------------------
----------------
795980 RIBON AW1 83 X 300
3,500 KOM 276,87 HRK
100,00 %
0,000 KOM 0,00 HRK
--------------------------------------------------------------------------
----------------
895085 ZUMZENTA SUPER BLUE ZUB
22.581,000 KG 186.162,56 HRK
0,51 %
22.467,466 KG 185.224,44 HRK
--------------------------------------------------------------------------
----------------
>
--------------------------------------------------------------------------
----------------
>
1902504 TRAMBAL MAZILO WATER&SKY CR06 511
296.376,000 KOM 738.671,52 HRK
--------------------------------------------------------------------------
----------------
700540 ETIK.SAMOLJ.U KOL.70X70 M
12,442 TKO 373,29 HRK
2,43- %
12,751 TKO 382,57 HRK
--------------------------------------------------------------------------
----------------
745395 FOL.STRETCH(500x0,023mm)s
28,600 KG 294,69 HRK
4,83 %
27,271 KG 281,10 HRK
--------------------------------------------------------------------------
----------------
795513 HILZA TRAMBAL MAZILO WATER
299,270 TKO 141.987,54 HRK
1,00- %
302,309 TKO 143.416,51 HRK
--------------------------------------------------------------------------
----------------
795514 KAPA ZA HILZU STICK ZA US
296,400 TKO 50.388,00 HRK
1,95- %
302,309 TKO 51.392,52 HRK
--------------------------------------------------------------------------
----------------
795639 KUTNI ELEMENT 5 SL. 1350*
209,200 KOM 129,70 HRK
6,25- %
223,164 KOM 138,35 HRK
--------------------------------------------------------------------------
----------------
795640 PRIREZ MEĐUREDNI 2 SL. 12
174,000 KOM 783,00 HRK
4,07- %
181,385 KOM 816,24 HRK
--------------------------------------------------------------------------
----------------
795665 ZBIRNA KUT. 248X163X120 +
12.490,000 KOM 13.836,28 HRK
0,91- %
12.606,063 KOM 13.963,84 HRK
--------------------------------------------------------------------------
----------------
795753 BLISTER MAZILO WATER&SKY
297,440 TKO 50.664,45 HRK
1,62- %
302,309 TKO 51.496,40 HRK
--------------------------------------------------------------------------
----------------
795754 BLISTER MAZILO WATER&SKY
299,100 TKO 23.965,34 HRK
1,06- %
302,309 TKO 24.221,86 HRK
--------------------------------------------------------------------------
----------------
795980 RIBON AW1 83 X 300
2,830 KOM 228,75 HRK
100,00 %
0,000 KOM 0,00 HRK
--------------------------------------------------------------------------
----------------
895080 TRAMBAL MAZILO WATER & SKY
1.377,000 KG 95.740,92 HRK
6,08- %
1.466,176 KG 101.943,41 HRK
--------------------------------------------------------------------------
----------------
>
How to normalize such data before and/or after importing to MS Access? How
to process such data in Access?

Thanks in advance,

Zlatko


Jan 31 '07 #3

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

Similar topics

2
by: Awah Teh | last post by:
I am working on a project that involves importing IIS Log files into a SQL Server database (and these logfiles are big --> Some up to 2GB in size). Up until now I thought that DTS or the BULK...
11
by: Grim Reaper | last post by:
I am importing a .csv file into Access that has 37 fields. My problem is that sometimes the last field only has data at the end of the column (it looks like when you import a file into Access, for...
1
by: sparks | last post by:
I have never done this and wanted to ask people who have what is the best way. One person said import it to excel, then import it into access table. but since this will be done a lot, I am...
14
by: MLH | last post by:
GHudson has working procedures posted at http://www.access-programmers.co.uk/forums/showthread.php?t=66320 They work. Relationships, however, and some minor default settings are not preserved....
0
by: sugarsmack | last post by:
Hi folks, Using XSL, I'm trying to take an XML file containing a flat list of "topics" and generate a hierarchical topic map. The topic nodes include a role attribute that indicates their position...
5
by: hharriel | last post by:
Hi, I am hoping someone can help me with an issue I am having with excel and ms access. I have collected data (which are in individual excel files) from 49 different school districts. All...
12
by: JMO | last post by:
I can import a csv file with no problem. I can also add columns to the datagrid upon import. I want to be able to start importing at the 3rd row. This will pick up the headers necessary for the...
1
by: Kosmos | last post by:
Hey guys, I'm fairly familiar with access by now, but I've never worked with importing text into an access database. I have some fairly large text files (lets say, for example, a folder of 20 text...
1
by: aconti74 | last post by:
Hello I am new to vba programming/coding. I am writing a program that goes through a directory of text files and imports them into the database. The problem is eventually the database gets to big...
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
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
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?
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
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.