Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
It is not a CSV file. That is your first mistake. A CSV file is comma
separated and you have a semicolon separated. (Hint Tab Separated is better, imo.) The comma separated files will load seven fields instead of six fields because a field contains a comma. To fix this surround each text field with quotes. That doesn't fix everything but it will help. Full Name,Doe, John,First Name, John, Last name, Doe To figure out the proper syntax for loading your specific file follow these instructions. Record Macro Open the file to be imported. (File | Open) Change the file type to "Text Files (*.prn; *.txt; *.csv)" Select the file to be loaded. Click Open Enable Delimited Click Next Select Semicolon as the delimiter and set up any other options as required Continue through the dialog Once the file is imported Stop the Macro Now look at the code that was generated and modify it as necessary. -- My handle should tell you enough about me. I am not an MVP, expert, guru, etc. but I do like to help. "lonfnico" wrote in message ... Format:=4 didnt work, and Format:=6, Delimiter:=";" doesnt work either. I have no idea how this damn csv is made, and close to no way to find out, as its made by some external source. If I open it with notepad, it doesnt even show the "return" chars, its just some ascii code (as it seems) that is not taken in charge by notedpad... But the ; are still there! I thought this would take 5 minutes, but finally, im going to use the day on it ![]() -- lonfnico ------------------------------------------------------------------------ lonfnico's Profile: http://www.excelforum.com/member.php...o&userid=33396 View this thread: http://www.excelforum.com/showthread...hreadid=532572 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I stop blank workbook from opening when opening an existing | Excel Discussion (Misc queries) | |||
Opening files in Excel 2003 saved in Excel 2000 without data loss... | Excel Discussion (Misc queries) | |||
Trouble opening large size Excel file 155Mb in Excel 2007 | Excel Discussion (Misc queries) | |||
REF errors when opening excel in xp. works fine when opening wor. | Excel Discussion (Misc queries) | |||
excel VBA problem - setting workbook as variable & opening/re-opening | Excel Programming |