Main   Products   Offshore Outsourcing   Customers   Partners   ContactUs  
JDBC Databases
  HXTT Access 7.1.142
  HXTT Cobol 5.0.142
  HXTT DBF 7.1.143
  HXTT Excel 6.1.146
  Buy Now
  HXTT Json 1.0.114
  HXTT Paradox 7.1.142
  HXTT PDF 2.0.142
  HXTT Text(CSV) 7.1.142
  HXTT Word 1.1.142
  HXTT XML 4.0.143
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 Excel
Mixed data type columns
Jeff Caldwell
2007-04-16 12:29:32.0
I am selecting data from a sheet with columns of mixed data types (e.g., 198765T, 864278,19-89765). I expected the column to be treated as all strings, yet the purely numeric values are being returned with a trailing decimal and zero (e.g., 864278.0) which is not in the original spreadsheet. How do I force the driver to treat these columns as type varchar and return only what was entered in the original sheet? I've tried CAST(), CONVERT(), CSTR() but the decimal and zero remain.
Re:Mixed data type columns
HXTT Support
2007-04-17 08:54:29.0
At Connecting to the Database, maxScanRows Indicates how many rows should be scanned when determining the column types. If you set maxScanRows to 0, the entire file is scanned. If you set maxScanRows to a negative value, the file won't be scanned. Default: 10
Try maxScanRows=-1.
Re:Re:Mixed data type columns
Jeff Caldwell
2007-04-17 10:55:16.0
I've followed your recommendation with no success. I've investigated further and found that the problem is with certain rows that were pasted in from another source. The cells apparently have some hidden "stuff" coming in with them that I can not see, but that causes them to always be selected as real numbers. The only way I was able to get the desired result was to apply the Excel "CLEAN()" function to the values and then paste them back into the cells.

I guess at this point I need to know if there is any way the hxtt driver can detect and/or strip out these extra characters in the same way that the Excel clean function does?
Re:Re:Re:Mixed data type columns
HXTT Support
2007-04-18 03:19:03.0
Pleaes email your xls sample, and let us know what's your issue.

Search Key   Search by Last 50 Questions


Copyright © 2003-2019 Heng Xing Tian Tai Lab of Xi'an City. | All Rights Reserved. | Privacy | Legal | Sitemap