Main   Products   Offshore Outsourcing   Customers   Partners   ContactUs  
JDBC Databases
  HXTT Access v7.1
  HXTT Cobol v5.0
  HXTT DBF v7.1
  HXTT Excel v6.1
  HXTT Json v1.0
  HXTT Paradox v7.1
  HXTT PDF v2.0
  HXTT Text(CSV) v7.1
 
  Buy Now
  Support
  Download
  Document
  FAQ
  HXTT Word v1.1
  HXTT XML v4.0
Offshore Outsourcing
Free Resources
  Firewall Tunneling
  Search Indexing Robot
  Conditional Compilation
  Password Recovery for MS Access
  Password Recovery for Corel Paradox
  Checksum Tool for MD5
  Character Set Converter
  Pyramid - Poker of ZYH
   
   
   
Heng Xing Tian Tai Lab of Xi'an City (abbr, HXTT)

HXTT Text(CSV)
Text(CSV) skipping few header lines
ajay
2006-03-30 13:44:52
How can we skip some header lines from a text file, say with some report header (My Project Budget)?
Re:Text(CSV) skipping few header lines
HXTT Support
2006-03-30 16:43:27
Please email us a simple data sample, then we will provide a connection property to support that function soon.
Re:Re:Text(CSV) skipping few header lines
ajay
2006-03-30 16:50:01
Product report for FY 1996
- - - - - - - - - - - -

id,pid,sku,alias,caf,siz,typ,idate
1,1,100-10,Cola,TRUE,12,Can,03/25/1996
2,1,100-20,Diet Cola,TRUE,12,Can,04/01/1996
3,1,100-30,Caffeine Free Cola,FALSE,16,Bottle,04/01/1996
4,2,200-10,Old Fashioned,TRUE,12,Bottle,09/27/1995
5,2,200-20,Diet Root Beer,TRUE,16,Bottle,07/26/1996
6,2,200-30,Sasparilla,FALSE,12,Bottle,12/10/1996
7,2,200-40,Birch Beer,FALSE,16,Bottle,12/10/1996
8,3,300-10,Dark Cream,TRUE,20,Bottle,06/26/1996
9,3,300-20,Vanilla Cream,TRUE,20,Bottle,06/26/1996
10,3,300-30,Diet Cream,TRUE,12,Can,06/26/1996
11,4,400-10,Grape,FALSE,32,Bottle,10/01/1996
12,4,400-20,Orange,FALSE,32,Bottle,10/01/1996
13,4,400-30,Strawberry,FALSE,32,Bottle,10/01/1996
Re:Re:Re:Text(CSV) skipping few header lines
HXTT Support
2006-03-30 23:09:00
Supported. Please download the latest package. v2.2.015 provides _CSV_Comment to specify whether ther're some comment lines before csv header and data rows. If you use n (integer values), the first n lines will be ingored as comment. If you use some paragraphs, these paragraphs will be used for csv file creation, the total line number of comment will be used for existent file.

For instance:
Properties props=new Properties();
props.put("_CSV_Comment","3");
//Or props.put("_CSV_Comment","Product report for FY 1996\r\n- - - - - - - - - - - - \r\n\r\n");
Connection con DriverManager.getConnection(url,props);

create table FY1996 (_CSV_Separator char(1) default ',', _CSV_Quoter char(1) default null,_CSV_Header boolean default true,_CSV_Comment longvarchar default 'Product report for FY 1996\r\n- - - - - - - - - - - - \r\n\r\n');
Or
create table FY1996 (_CSV_Separator char(1) default ',', _CSV_Quoter char(1) default null,_CSV_Header boolean default true,_CSV_Comment longvarchar default 3);

Search Key   Search by Last 50 Questions




Google
 

Email: webmaster@hxtt.com
Copyright © 2003-2019 Heng Xing Tian Tai Lab of Xi'an City. | All Rights Reserved. | Privacy | Legal | Refund | Sitemap