[thelist] CSV & Excel

Carl J Meyer cjmeyer at npcc.net
Tue Feb 18 11:07:01 CST 2003


hi Kristina,

On Tue, 2003-02-18 at 08:48, kristina wrote:
>   When I try and 'save as' from Excel it does two
>   things - it removes the first two columns (my
>   two null fields) and changes all the date
>   formats to dd/mm/yy - when I need them to be
>   yyyy-mm-dd.

I'm no use with Excel, but it shouldn't be at all difficult to make your
PHP robust enough to handle these differences, which is probably a
better solution than trying to force Excel to do things your way (which
relies on your users to get it right).

Hard to go into more detail without knowing what your code looks like,
or how you're performing the mySQL insert... at the very least you could
mangle the uploaded CSV to add the null fields if they aren't present,
and to rearrange the date field if necessary.

Carl




More information about the thelist mailing list