LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Dennis
 
Posts: n/a
Default VBA Import of text file & Array parsing of that data

Using XL 2993 & 97

The array formula which parses the information below (from a text file) by
"trimming" elements of the "Directory" line of information is:


Workbooks.OpenText Filename:="C:\Test\Listing.txt", _
Origin:=xlWindows, StartRow:=1, DataType:=xlFixedWidth, _
FieldInfo:= Array(Array(0, 1), Array(10, 1), Array(17,1), _ Array(21, 1),
Array(39, 1))



Specifically:

"Directory of C:\BOB AMY Estates\Bank Documents"
is being parsed: (because of data columns following it)

11/21/2004|of C:\|BOB|AMY Estates\Bank|Documents
0 | 10 |17 | 21 | 39

******** Portion of the Actual Text Document ****^**********

Directory of C:\BOB AMY Estates\Bank Documents

11/21/2004 03:02 PM 120,787 NCB Ck #101.jpg
11/21/2004 03:01 PM 149,374 NCB Ck #93.jpg
11/21/2004 02:45 PM 136,291 NCB Ck Template.jpg
........... ..... .. ....... ...................
........... ..... .. ....... ...................
************************************************** ********

If I concatenate the columns created by the XL import array formula, I end
up with:

C:\BOBAMY Estates\BankDocuments

not the actual path of

C:\BOB AMY Estates\Bank Documents

Is there a way to force the array formula above to capture the space after
"BOB" to get "BOB " and also after
"AMY Estates\Bank" to get "AMY Estates\Bank "?

Yes, I can on-the-fly fix the data in the opeing XL file.
But I may have to manually change each similar data line.

I do not understand Array formula VBA parameter setup and coding. But
saying that, it seems to me that the array formula above is trimming spaces
before and after the data in the array elements above.

Any help is welcomed!

TIA Dennis
 
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
Help with data not getting plotted Scott Ehrlich Charts and Charting in Excel 1 January 23rd 05 05:15 PM
Extending a Chart Data Series from an Array - Can it be done? Jon Peltier Charts and Charting in Excel 4 November 30th 04 03:30 AM
Bar Chart for Text Data RichIII Charts and Charting in Excel 1 November 29th 04 07:03 PM
How do I import data from a SECURED website into Excel? Jimmy Lam Excel Discussion (Misc queries) 0 November 27th 04 04:12 PM
import csv file Patrick Excel Discussion (Misc queries) 2 November 27th 04 10:09 AM


All times are GMT +1. The time now is 01:49 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"