The new forums will be named Coin Return (based on the most recent vote)! You can check on the status and timeline of the transition to the new forums here.
The Guiding Principles and New Rules document is now in effect.

OMFFFFFG Excel date conversion

GenlyAiGenlyAi Registered User regular
edited January 2011 in Help / Advice Forum
Ok, I've been annoyed by this for like 15 years, so I guess this isn't urgent, but at some point my head is going to fucking explode and I prefer to avoid that.

Say I have a CSV or a tab-delimited file that I want to import into motherfucking excel ('03). Say it's got some fields like:

1-3 or 8/12

Excel will convert this shit to its internal date format representing January 3 or August 12. Is there any, ANY way to prevent this? I know I can modify the text file and put some quotes in, but that's bullshit, and it's not always practical. I want to stop this from happening at all.

Excel, why is this your default behavior, motherfucker, when you have a function anyone can use to do this conversion themselves? And whyyyyyyyyyy don't you have an option to turn it off?

Am I being dumb? Please tell me I'm being dumb and there's a solution to this. All I want is for Excel to never convert a date again without me asking it to. I don't care if I have to root my computer to get it, tell me what to do HA.

GenlyAi on

Posts

  • schussschuss Registered User regular
    edited January 2011
    When you import, define the column as text or number, not date or general.

    schuss on
  • GenlyAiGenlyAi Registered User regular
    edited January 2011
    Ok, nice, thanks very much. Maybe I should have thought of that, but I never go through the open command. Is there any way of getting it to work with drag-and-dropped files? (IOW, I guess, to get "general" to stop trying to identify and convert dates?)

    GenlyAi on
  • schussschuss Registered User regular
    edited January 2011
    GenlyAi wrote: »
    Ok, nice, thanks very much. Maybe I should have thought of that, but I never go through the open command. Is there any way of getting it to work with drag-and-dropped files? (IOW, I guess, to get "general" to stop trying to identify and convert dates?)

    If you're talking about copy/pasting etc., just define the column as "Text" before you paste and select "Match destination formatting"

    schuss on
  • bwaniebwanie Posting into the void Registered User regular
    edited January 2011
    GenlyAi wrote: »
    Ok, nice, thanks very much. Maybe I should have thought of that, but I never go through the open command. Is there any way of getting it to work with drag-and-dropped files? (IOW, I guess, to get "general" to stop trying to identify and convert dates?)

    not that i'm aware of no.

    bwanie on
  • RookRook Registered User regular
    edited January 2011
    Can't you just set the properties of the Row/Column to be number or general rather than date?

    Rook on
  • bwaniebwanie Posting into the void Registered User regular
    edited January 2011
    only in the excel file itself.

    when opening csv's or txt files excel just goes loose.

    bwanie on
  • schussschuss Registered User regular
    edited January 2011
    bwanie wrote: »
    only in the excel file itself.

    when opening csv's or txt files excel just goes loose.

    With CSV/TXT, you should be able to specify column types and break types upon opening it the first time. Just make sure you hit next until you can change them from "General" to "Text"

    schuss on
  • GenlyAiGenlyAi Registered User regular
    edited January 2011
    schuss wrote: »
    bwanie wrote: »
    only in the excel file itself.

    when opening csv's or txt files excel just goes loose.

    With CSV/TXT, you should be able to specify column types and break types upon opening it the first time. Just make sure you hit next until you can change them from "General" to "Text"

    This is great, but I would still love some way it would work when I just drag a file from windows explorer. If you do that, Excel just makes every column "general".

    Going through the Open menu item is a perfectly fine work around

    ...

    it just doesn't scratch my urge to make Excel obey me, to teach it that its normal way is the stupid way and that it is just software while I am a MAN.

    But what are you gonna do.

    GenlyAi on
  • schussschuss Registered User regular
    edited January 2011
    GenlyAi wrote: »
    schuss wrote: »
    bwanie wrote: »
    only in the excel file itself.

    when opening csv's or txt files excel just goes loose.

    With CSV/TXT, you should be able to specify column types and break types upon opening it the first time. Just make sure you hit next until you can change them from "General" to "Text"

    This is great, but I would still love some way it would work when I just drag a file from windows explorer. If you do that, Excel just makes every column "general".

    Going through the Open menu item is a perfectly fine work around

    ...

    it just doesn't scratch my urge to make Excel obey me, to teach it that its normal way is the stupid way and that it is just software while I am a MAN.

    But what are you gonna do.

    Just remember that excel does what excel pleases, which is a gigantic pain in the ass sometimes. Drag and drop things like that are hardcoded to go all-general, which can be super-frustrating. Endlessly useful program, endlessly aggravating for stupid reasons.

    schuss on
  • AngelHedgieAngelHedgie Registered User regular
    edited January 2011
    Actually went through this at work yesterday.

    When you paste data into Excel, there should be a small clipboard icon next to the pasted content. Click on it, and you'll get a menu that has the option to define the import format. Select that option, then go through the wizard that pops up to define the column limits and formats.

    AngelHedgie on
    XBL: Nox Aeternum / PSN: NoxAeternum / NN:NoxAeternum / Steam: noxaeternum
  • schussschuss Registered User regular
    edited January 2011
    Actually went through this at work yesterday.

    When you paste data into Excel, there should be a small clipboard icon next to the pasted content. Click on it, and you'll get a menu that has the option to define the import format. Select that option, then go through the wizard that pops up to define the column limits and formats.

    Yeah, he was looking for doing it to the whole file without dealing with the dialog.

    schuss on
  • HefflingHeffling No Pic EverRegistered User regular
    edited January 2011
    When you import the file from text to Excel using the import tool, you should have the option on the screen after you define your deliniations (if importing in a non-tab delimited form) as text.

    Also, you can re-define the cells or column once imported to show the date in a preferred format. You can even make your own format if you spend a little time learning Excel's context.

    Heffling on
  • RayKayRayKay Registered User new member
    schuss wrote: »
    When you import, define the column as text or number, not date or general.
    I have the same complaint about Excel, and since I ain't no noob, I already new to try this.... but it didn't work. Using Office 2013. It seems excel couldn't give a rats a** about WHICH format I wanted to use in a cell: regardless of cell format, IF there was a way it could interpret my text as a date, it did so. I had to add an extra character to the entry to prevent it.

    Excel, you suck.

  • Inquisitor77Inquisitor77 2 x Penny Arcade Fight Club Champion A fixed point in space and timeRegistered User regular
    A couple of things:

    1) Excel always stores any date-like figure in its own special data format. This allows it to do things like add/delete days from one another, and maintain the actual date value while being able to display different date formats. It's annoying when you don't want it to do that, but it's a godsend when you do. If you can, I'd recommend keeping two columns to be safe - one with the date stored as-is, and the other with the date stored in Excel's format.

    2) Never just "paste" stuff into Excel. You generally want to follow a two-step process:
    • a) Select the source and destination cells/sheet you want to have a special format, and change their formatting first (Ctrl+1). If you want to change the formatting for an entire sheet, click the triangle in the top-left corner (between the A and the 1) or use Ctrl+A. Do not just drag-select as many cells as possible, or the formatting will only change for your subset selection and not for the entire sheet. This will bite you in the butt if you add in a data set that is larger than what you highlighted.
    • b) Do not just use Paste. Always use Paste Special (Alt+E, Alt+S). For example, I have Paste Special -> Values saved to my muscle memory (Alt+E, Alt+S, V) just by sheer repetition.

    3) The vast majority of casual use cases I've seen are easily managed by setting the source and destination Formats to "Text" and then Paste Special -> Values. This will allow you to put in something like "12 Nov 2014" or "00141232", copy it as text, and then paste it back in as-is without Excel performing any automatic transformations.

This discussion has been closed.