Schema.ini structure for large file import

dBase, Calc, CSV, MS ACCESS, MySQL, PostgrSQL, OTHER
Post Reply
cashnumbers
Posts: 2
Joined: Tue May 03, 2011 5:40 pm

Schema.ini structure for large file import

Post by cashnumbers »

I'm a relative newbie and have recently set-up a base document to read several large text files into tables. Schema.ini is below as is text file structure (portion of it at least)...

Result is: tables are created but with entire record in one cell and in every cell in the table....

Can anyone see the issue?

Please Help...



schema.ini************************************
[ROIELECAPR2011file?.txt]
ColNameHeader=True
Format=FixedLength
MaxScanRows=0
CharacterSet=OEM
Col1=EDC DUNS Number Char Width 13
Col2=Customer Account Number Char Width 30
Col3=Meter Read Cycle Char Width 2
Col4=Customer Name 1 Char Width 35
Col5=Customer Name 2 Char Width 35
Col6=Service Address 1 Char Width 35
Col7=Service Address 2 Char Width 35
Col8=Service City Char Width 35
Col9=Service State Char Width 2
etc.

Portion of text file in Data Source directory:
**********************************************************************************
EDC DUNS Number,Customer Account Number,Meter Read Cycle,Customer Name 1,Customer Name 2,Service Address 1,Service Address 2,Service City,Service State,Service Zip,Billing Name 1,Billing Address 1,Billing Address 2,Billing City,Billing State,Billing Zip,Billing Country Code,Contact Name 1,Contact Address 1,Contact Address 2,Contact City,Contact State,Contact Zip,Contract Country Code,Rate Code,Rate Subclass,Profile Group,Total KWH ,Number of Months,Peak Demand (12 mo) ,Load Factor,Capacity Obligation,Old Customer Account Number,Usage Period 1,Demand Period 1,Period 1,Usage Period 2,Demand Period 2,Period 2,Usage Period 3,Demand Period 3,Period 3,Usage Period 4,Demand Period 4,Period 4,Usage Period 5,Demand Period 5,Period 5,Usage Period 6,Demand Period 6,Period 6,Usage Period 7,Demand Period 7,Period 7,Usage Period 8,Demand Period 8,Period 8,Usage Period 9,Demand Period 9,Period 9,Usage Period 10,Demand Period 10,Period 10,Usage Period 11,Demand Period 11,Period 11,Usage Period 12,Demand Period 12,Period 12,Network Service,Meter Flag,Filler
007914468 5008750002 04CDI HEAD START 1118 W LEHIGH AV PHILADELPHIA PA19133 CDI HEAD START P.O. BOX 60978 PHILADELPHIA PA19133 USA U92 GS 101 0000000000084271100000000000.0000000000010.43 00000000000068000000000000.00020110206-2011030700000000000081600000000000.00020110105-2011020600000000000214800000000000.00020101202-2011010500000000000099900000000000.00020101031-2010120200000000000065000000000000.00020101003-2010103100000000000266500000000000.00020100901-2010100300000000000000000000000000.00020100803-2010090100000000000000000000000000.00020100705-2010080300000000000000000000000000.00020100603-2010070500000000000000000000000000.00020100504-2010060300000000000046900000000000.00020100420-2010050400000000000000000000000000.000 0000000011.25SH
007914468 5012700806 20BIO-MEDICAL APPLICATION OF NORTH PHILA 1240 N 26TH ST 1ST FL PHILADELPHIA PA19121 BIO-MEDICAL APPLICATION STE 1000 1 WESTBROOK CORPORATE CENTER WESTCHESTER IL60154 USA U92 GS 101 0000000001708801200000000000.0000000000068.64 00000000002440000000000000.00020110228-2011032900000000003208000000000000.00020110130-2011022800000000003544000000000000.00020101228-2011013000000000003040000000000000.00020101123-2010122800000000001472000000000000.00020101025-2010112300000000000856000000000000.00020100926-2010102500000000000000000000000000.00020100825-2010092600000000000000000000000000.00020100727-2010082500000000000000000000000000.00020100627-2010072700000000000000000000000000.00020100526-2010062700000000001192000000000000.00020100427-2010052600000000001336000000000000.00020100329-201004270000000074.04SH
OpenOffice 3.2 on Windows Vista
cashnumbers
Posts: 2
Joined: Tue May 03, 2011 5:40 pm

Re: Schema.ini structure for large file import

Post by cashnumbers »

...just upgraded to Ooo 3.3 ....

if that matters for this issue.... please help...
OpenOffice 3.2 on Windows Vista
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Schema.ini structure for large file import

Post by Villeroy »

Whichever software is supposed to work with this file format, use that one.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
rudolfo
Volunteer
Posts: 1488
Joined: Wed Mar 19, 2008 11:34 am
Location: Germany

Re: Schema.ini structure for large file import

Post by rudolfo »

About how many records in your datafiles are you talking? Also it would have been helpful if you told exactly how man records you copied in your "portion of text". It looks like a header line (comma separated) and two data lines. But if it comes to debugging I hate it to guess and make assumptions.
The version of Calc that comes with OOo 3.3 has improved plain text import options and also allows more rows then the previous 16bit limit. Try to import the data into Calc with its fixed width approach and then copy the data into a base table. (You will probably have to create this table first in Base if you haven't done this so far).
OpenOffice 3.1.1 (2.4.3 until October 2009) and LibreOffice 3.3.2 on Windows 2000, AOO 3.4.1 on Windows 7
There are several macro languages in OOo, but none of them is called Visual Basic or VB(A)! Please call it OOo Basic, Star Basic or simply Basic.
Post Reply