Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Need importing macro to recognize #*# as delimiter

Hi Everybody,

I need to export a table of many columns to text from SQL Server, and
I'm checking that exported file in Excel. The problem is the
customer's required delimiter. They insist we use hash-star-hash (#*#)
as the delimiters in the final text file, and even after recording an
import in Excel and modifying the following "OtherChar" parameter as
shown below, the import still does not work correctly.

Workbooks.OpenText Filename:= "my_delimited_file.txt",
Origin:=-535, StartRow:=1, DataType:=xlDelimited,
TextQualifier:=xlTextQualifierNone, _
ConsecutiveDelimiter:=False, Tab:=False, Semicolon:=False, Comma:=
False, _
Space:=False, Other:=True,
OtherChar:="#*#",
FieldInfo:=Array(...

So apparently it's not as simple as replacing the OtherChar argument.

Looking for suggestions! Thanks,
-Eric B.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Need importing macro to recognize #*# as delimiter

I think the OtherChar has to be a single character for the delimiter to
work. I had a similar problem trying to import text output from a database
and had to use a single character delimiter for import to work. In your
case you could use a '#' as the delimiter and then delete the columns
containing the '*' chars.


"Eric Bragas" wrote in message
oups.com...
Hi Everybody,

I need to export a table of many columns to text from SQL Server, and
I'm checking that exported file in Excel. The problem is the
customer's required delimiter. They insist we use hash-star-hash (#*#)
as the delimiters in the final text file, and even after recording an
import in Excel and modifying the following "OtherChar" parameter as
shown below, the import still does not work correctly.

Workbooks.OpenText Filename:= "my_delimited_file.txt",
Origin:=-535, StartRow:=1, DataType:=xlDelimited,
TextQualifier:=xlTextQualifierNone, _
ConsecutiveDelimiter:=False, Tab:=False, Semicolon:=False, Comma:=
False, _
Space:=False, Other:=True,
OtherChar:="#*#",
FieldInfo:=Array(...

So apparently it's not as simple as replacing the OtherChar argument.

Looking for suggestions! Thanks,
-Eric B.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Need importing macro to recognize #*# as delimiter

Eric,
Easiest would to export twice; once with "#*#" and once with an Excel
compliant delimiter. Would that satisfy your check ?

NickHK

"Eric Bragas" wrote in message
oups.com...
Hi Everybody,

I need to export a table of many columns to text from SQL Server, and
I'm checking that exported file in Excel. The problem is the
customer's required delimiter. They insist we use hash-star-hash (#*#)
as the delimiters in the final text file, and even after recording an
import in Excel and modifying the following "OtherChar" parameter as
shown below, the import still does not work correctly.

Workbooks.OpenText Filename:= "my_delimited_file.txt",
Origin:=-535, StartRow:=1, DataType:=xlDelimited,
TextQualifier:=xlTextQualifierNone, _
ConsecutiveDelimiter:=False, Tab:=False, Semicolon:=False, Comma:=
False, _
Space:=False, Other:=True,
OtherChar:="#*#",
FieldInfo:=Array(...

So apparently it's not as simple as replacing the OtherChar argument.

Looking for suggestions! Thanks,
-Eric B.



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Need importing macro to recognize #*# as delimiter

This idea will work for me, since all I'm doing is validating what's in
the file. The format is important to the customer, but it's only the
data I care about. I'm going to go with your suggestion. Thank you.

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
Need Help Importing Text File Using Two or More Spaces as the Delimiter [email protected] Excel Discussion (Misc queries) 11 June 13th 06 02:08 AM
Need Help Importing Text File Using Two or More Spaces as the Delimiter [email protected] Excel Programming 11 June 13th 06 02:08 AM
Adding a delimiter when importing a txt file dfwboiler Excel Programming 0 March 27th 06 10:33 PM
Macro to Recognize Dates JoeS Excel Programming 5 November 2nd 05 10:30 PM
Can't get Outlook to recognize address card fields when importing. eointfinn Excel Discussion (Misc queries) 0 February 6th 05 01:09 AM


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