Problem with 'Workbooks.OpenText

J

jo

Hi,

Good Day..

I am using the following call to open an XML document. Its a "|"
delimited file.

Workbooks.OpenText Filename:=strDataFile, Origin:=xlWindows,
DataType:=xlDelimited, Semicolon:=False, _
Space:=False, Other:=True, OtherChar:="|",
ConsecutiveDelimiter:=False, TextQualifier:=xlTextQualifierDoubleQuote,
_
FieldInfo:=Array(Array(1, 2))

When i use the extension .xml the above call fails. It doesnt return
from this statement and just hangs for ever. But if i just change the
extension to .txt it works perfect and as expected. I tried using
'Workbooks.OpenXML but it fails
File cannot be opened because:
A semi colon character was expected.
Looks like OpenXML expects a semi colon delimited file.

Any help on this will be of great help./

thanks
Jo..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top