Orlando -
Here's an ancient piece of code I use for this:
Sub inputTXTfile()
' input text file line by line without interpreting html tabs
' open new sheet first and select home cell
Dim linein As String, fh As Integer, FileName As String, lineNum As Double
FileName = Application.GetOpenFilename
If FileName = "False" Then Exit Sub
Application.ScreenUpdating = False
lineNum = 0
fh = FreeFile
Workbooks.Add
Open FileName For Input As fh
Do Until EOF(fh)
Line Input #fh, linein
ActiveCell.Offset(lineNum, 0) = linein
lineNum = lineNum + 1
Loop
Close #fh
Application.ScreenUpdating = True
End Sub
- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______
wrote:
Hi,
I'm exporting contents to excel from a web application. Each row looks
like this:
"3101" "American Express" "Fort Lauderdale" "FL" "Deployed" "Windows
2001R1" "<![CDATA[<HTML
<BODY
<P
<BIMPORTANT:</B We have updated server. You must click the button
again to receive your account information.
<P
More text goes here
</P
</BODY
</HTML]]"
However, when the file is opened in Excel only the text in the last
column is displayed (the tags and all the other cells are missing). How
do I get excel to just print all columns and the literal contents
without trying to do anything smart? I know if I get rid of the <HTML
and <BODY tags it works, but unfortunately I need to leave them in -
and they need to show up as <HTML and <BODY.
Any ideas?
thanks,
Orlando