Prev: Use Macro to Format UserForm Object
Next: FYI: MSDG not displaying posts; expects duplicates :-(
From: ker_01 on 8 Jan 2010 19:55 I'm generating a flat file in Outlook VBA. Right now I'm able to save it as a ..txt file, although I hope to save it in a delimited flat file format with an ..xls extension so it will automatically be opened by excel without having to go through the whole 'import' sequence. There are string fields in the file, some of which contain commas- so I can't make it a comma delimited file. What is the best delimiter to use so that Excel will automatically recognize and parse the flat file contents across columns? Currently in 2003, but strongly prefer solutions that will also work in 2007 Many thanks, Keith
From: macropod on 8 Jan 2010 22:51 Hi ker_01, You can use a csv file by enclosing each field that might contain commas in double quotes. Applying an xls extension to a text file does not a valid Excel file make and is liable to generate an error message when Excel tries to open it. Plus, if you then proceed to open the file, all the data will probably be in one column. -- Cheers macropod [Microsoft MVP - Word] "ker_01" <ker01(a)discussions.microsoft.com> wrote in message news:4DDBC7F0-3966-436C-80EC-54908AA3244F(a)microsoft.com... > I'm generating a flat file in Outlook VBA. Right now I'm able to save it as a > .txt file, although I hope to save it in a delimited flat file format with an > .xls extension so it will automatically be opened by excel without having to > go through the whole 'import' sequence. > > There are string fields in the file, some of which contain commas- so I > can't make it a comma delimited file. > > What is the best delimiter to use so that Excel will automatically recognize > and parse the flat file contents across columns? > > Currently in 2003, but strongly prefer solutions that will also work in 2007 > > Many thanks, > Keith
From: FatBytestard on 9 Jan 2010 11:42 On Sat, 9 Jan 2010 14:51:17 +1100, "macropod" <macropod(a)invalid.invalid> wrote: >Hi ker_01, > >You can use a csv file by enclosing each field that might contain commas in double quotes. > >Applying an xls extension to a text file does not a valid Excel file make and is liable to generate an error message when Excel >tries to open it. Plus, if you then proceed to open the file, all the data will probably be in one column. Using a sig AND being a top poster is a RETARDED combination as your sig causes the message you responded to to get snipped. You're an idiot. Either STOP using a sig as they are NOT even needed, or STOP top posting, friggin idiot.
From: CellShocked on 9 Jan 2010 11:46 On Fri, 8 Jan 2010 16:55:01 -0800, ker_01 <ker01(a)discussions.microsoft.com> wrote: >I'm generating a flat file in Outlook VBA. Right now I'm able to save it as a >.txt file, although I hope to save it in a delimited flat file format with an >.xls extension so it will automatically be opened by excel without having to >go through the whole 'import' sequence. > >There are string fields in the file, some of which contain commas- so I >can't make it a comma delimited file. > >What is the best delimiter to use so that Excel will automatically recognize >and parse the flat file contents across columns? > >Currently in 2003, but strongly prefer solutions that will also work in 2007 > >Many thanks, >Keith If you are creating the text file, and you get to insert the delimiters, then you can choose a character other than a comma, no problem. When you go to import it into an excel workbook (yes, this step is required), you choose the delimiter that you constructed the text file with, and it will import it perfectly every time as long as the character you chose does not "pop up" in the data strings you are trying to import. So, choose carefully.
From: macropod on 10 Jan 2010 20:14 Hi FatBytestard, Have a nice day! -- Cheers macropod [Microsoft MVP - Word] "FatBytestard" <FatBytestard(a)somewheronyourharddrive.org> wrote in message news:lbchk5tkk5sjdro8oeqdcdbpdiaaia7b62(a)4ax.com... > On Sat, 9 Jan 2010 14:51:17 +1100, "macropod" <macropod(a)invalid.invalid> > wrote: > >>Hi ker_01, >> >>You can use a csv file by enclosing each field that might contain commas in double quotes. >> >>Applying an xls extension to a text file does not a valid Excel file make and is liable to generate an error message when Excel >>tries to open it. Plus, if you then proceed to open the file, all the data will probably be in one column. > > > Using a sig AND being a top poster is a RETARDED combination as your > sig causes the message you responded to to get snipped. > > You're an idiot. Either STOP using a sig as they are NOT even needed, > or STOP top posting, friggin idiot.
|
Next
|
Last
Pages: 1 2 Prev: Use Macro to Format UserForm Object Next: FYI: MSDG not displaying posts; expects duplicates :-( |