• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Import text to Excel 2007 issue

cacos

Member
Hi everyone!

I'm having a tough time with this. Is there any way to convert any text file format for Excel 2007 to read without problems?

I'm writing some code that does text processing, and it works fine with text from Excel 2007, but now I was given a file that apparently has a different format (though it was saved as .xls) and the code takes like 20,30 times to do the same operation.

If it helps, at the end of some lines it had char(10) characters, which I've cleaned to no effect.

Thanks!!
 
Hi, cacos!
Excel since prehistoric versions and not just 2007 in advance, reads text files without any problem.
.csv or .prn files are opened directly, .txt or other text files are opened with the feature to bound columns either with fixed length or with separator characters.
Said so, I don't fully understand your issue. Are you saying that a text file has been renamed/saved as .xls? Tried renaming it? Otherwise Excel will expect a valid workbook and not a text file.
Otherwise consider uploading a sample file.
Regards!
 
Back
Top