Export csv
Christopher Yerry
christopheryerry at yahoo.com
Fri Aug 19 07:57:32 PDT 2005
-Created an export to a csv file as I have done many times.
-The export is a list of stores with the first column being the store number.
-Each record consist of 45 fields which are being outputted.
-Everything worked fine except when I checked the file in Excel, I found the
-store 40's data was on the same line as store 39 but started at the column for
-field 35.
-Every other line was correct.
-I tested the output by just selecting store 39. The data was correct.
-I tested the output just for store 40, and it was correct.
-Testing both, again everything on one line.
-The one think I found in checking field 35 for store 39, was a dimension field
-having 8'X72".
-When I changed this to 8'X6' everything worked correctly.
-Column 35, when 8'X72" looked like this 8"X72","","" and then the second field
-for store 40 and the next 10 fields of data from store 40.
-Can anyone tell me why the 72"(inch) caused this problem? How would one avoid
-the problem if the " was a necessary part of the text field?
-Richard Kreiss
-GCC Consulting
Richard
8'X72". has a double quote at the end
8'X6' has a single
Excel will certainly parse these differently - check your text in quotes option in excel, its a
drop down selection. you need to turn it off its ignoring your next comma because its after the
double quote.
Write a routine that goes through your data and removes the double quotes and replaces them with
single
Aka
Then:X="1" 'Initilize the counter
Loop If: asc(mid(<FieldNumber>,"1",x)) = "34" 'If there is a "
Then: mid(FieldName,"1",x)= asc("39") 'replace it with '
If: x < len(<FieldNumber> 'Search to the end
Then: goto loop
if:
Then:(export routine)
Then write it to the export. ... and yes I indent filepro code and I make everyone else here do
the same. (gasp!)
Christopher Yerry
CM Software
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
More information about the Filepro-list
mailing list