Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Import - query table - retain trailing blanks in fields

I am importing a flat file a fixed length 12 byte record.

I set up the worksheet for
Cell A1 - text, cell width=8
(data validation set to text with min and max length=8)
Cell B1 - text, cell width=4
(data validation set to text with min and max length=4)

My flat file has the following record 'Col1 Col2'.

I use a macro with a querytable command to get the record using
fixedcolumnwidth, specify text format columns, and specifying the
length of each column.

However, when the record is imported to the spreadsheet, the data in
Cell A1 is 'Col1' - without the trailing blanks. Is there a way to
use the querytable to import these fields into the cells and retain
any trailing blanks in the fields? If not, is there another method
to import a flat file with fixed length fields into the worksheet and
retain any trailing blanks in the fields...
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Concatenate and include trailing blanks Mr_Wilf Excel Discussion (Misc queries) 5 October 23rd 09 10:13 AM
Excel web query does not import table (from yahoo finance) correct Jerome Excel Discussion (Misc queries) 1 April 19th 09 01:21 PM
Microsoft Query sometimes adds trailing spaces to fields No Name Excel Discussion (Misc queries) 1 June 4th 07 03:17 PM
Trailing blanks SAS Excel Discussion (Misc queries) 2 January 7th 05 09:42 PM
Macro - trailing blanks Dennis Griffith Excel Programming 0 September 4th 03 02:37 PM


All times are GMT +1. The time now is 11:22 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"