Numbers date import csv

I am trying to import a csv file into a UK version of Numbers but the csv file has dates formatted in US notation. When this CSV file is opened in numbers one of two things happens. Either the date is not recognized as a date and remains as it is, or the date is recognised as the incorrect date.
CASE 1
In CSV file I have  "06/26/2012 05:58"     Which is the 26th of June at 5:58
In numbers it comes up as : 06/26/2012 05:58   whne imported.. Note this is not recognised as date but as plain text
CASE 2
In CSV file I have   "07/02/2012 05:56"      Which is the 2nd of July 2012 at 5:56
In Numbers it comes up as : 7 Feb 2012 05:56 when imported.
Does anyone know how to resolve this? I would really appreciate help on this
-Andy

Hi Jerry,
Thanks for responding. I understand why it happens, but do you know how to have a UK version recognise the US formatted dates?
The CSV files I import are exported from a legacy system and I can't change the format it exports. Developed in the US, so all dates are in MM/DD/YYYY. I have been fixing manualy but I am now faced with thousands of records to go through and I was kind of hoping there is a simpler way to do this.
I can't work out how to set the application to a different zone, it's not in the preferences.
Andy

Similar Messages

  • Numbers issue importing csv with this field "00:00:00:00"

    Greetings,
    I'm trying to import a .csv file into Numbers. One of the fields is Timecode with the format 00:00:00:00
    Numbers tries to read this as a date and doesn't know how to deal with it. I've tried every cell type to no avail..
    Anyone have any ideas?
    thx

    I'm importing a .csv file from an audio recorder with the goal of generating a .pdf report. Inside the .csv file is a column that for every file has a smpte timecode field in the form of hr:min:sec:frames or 01:02:45:00
    When importing this into Numbers, the program can't convert this properly so it creates a useles date out of if. I need Numbers to just import this as Text or not attempt to convert it to some other field type. Here's what a row from the output of the recorder looks like
    25Y-04.WAV,25Y,04,00:01:35,04:44:12:00,"MIX",,"BOOM-416",,,,,,,,,,"",
    Numbers doesn't deal with 04:44:12:00

  • How to import a Numbers data without to be an image (we need to modify it)

    I just want to know ifit is possible to import a Numbers data with the possibility to modify it after the importation (like we do in Excel).
    To be clear, I want to make a Numbers data, import it in Pges and after continue to modify in Numbers. I don't want to import an image, I want to keep the possibility of modification.

    I'm still not 100% sure what you want to achieve, so I give two answers, at least one of which will be irrelevant.
    1. If you just want to get data from Numbers to pages, simply make a copy and paste, and you are done.
    2. If you want to keep a link to the data, like with OLE in the MS world, there is no such thing. Once data is imported to Pages it is Pages data. If you change it in Numbers, you need to reimport (copy/paste) it to Pages.

  • Importing CSV file and parsing it

    First of all I am very new to writing powershell code.  Therefore, my question could be very rudimentary, but I cannot find an answer, so please help.
    I'm trying to read a CSV file and parse it.  I cannot figure out how to access nth element without hardcoding its name.
    $data = Import-Csv $file   #import CSV file
    # read column headers (manually read the first row of the data file, or import it from other source, or ...)
    $file_dump = Get-Content $file  #OK, I'm sure there is another way to get just the first line, but that's not relevant
    $name_list = $file_dump[0].split(",")
    # access element
    $temp = $data[$i].Name  # works - but that's HARDCODING the column name into the script - what if someone changes it?
    #but what I want to do is
    $temp = $data[$i].$name_list[0]
    How do I do this in PowerShell?

    So you're asking how to get the first data point from the first column, no matter what the header is?
    Why won't you know what your input file looks like?
    You can always drop the first line of the file to remove the existing headers and then use the -Header parameter of Import-Csv to give yourself known headers to reference (this will only work if you know how many columns to expect, etc etc etc).
    http://ss64.com/ps/import-csv.html
    Don't retire TechNet! -
    (Don't give up yet - 13,085+ strong and growing)

  • How to find out what was imported from Import-CSV

    If I have an input file that could contain any CSV field names in the headers and after I run Import-CSV I want to find the names of the fields that were imported. How can I do this?

    Hi Patrick,
    generally speaking, you can figure out a lot about what you are working with by using the PowerShell commandline, not a script. You can inspect an object's 'attributes' - as shown by Adam - using the Get-Member cmdlet (You can do this to the content of any
    variable, not just Csv imports):
    # Get content of Csv file
    $Data = Import-Csv "C:\temp\Input.csv"
    # List properties:
    $Data | Get-Member
    The resulting information is a table with 3 columns:
    - Name: The Name of the attribute
    - MemberType: This tells you what it is. The two Types usually of interest are "Method" and anything containing the word "Property". Method does something (Save a file, disable a Mailbox, etc.). Property is a piece of Information (eg. UserName,
    Email, Address, ...).
    - Definition: The definition-column is in my opinion the most interesting aspect of the output of Get-Member. This tells you how to interact with the objects' 'attribute' in question. In case of methods, it shows how to call it and what it returns (Let's say
    you want to save a file: The Method Save() might then require you to specify a path where to save the file).
    In case of Properties however it tells you what kind of information is stored in the Property. If you import a csv, that's always a string for each column, since all you can store in a csv file is text. In some cases, when the console behaves differently to
    what you'd expect, check this out - it may well be that the property is of a type you didn't expect. All Types can be looked up on MSDN (just copy paste the full type-name to google and it'll send you there).
    Learn to use the Get-Member cmdlet and you can figure out how to work with what the console gives you all on your own (Seriously, it's one of the three most important cmdlets in all of PowerShell). Try reading:
    Get-Help Get-Member -Examples
    Those examples explain the use of Get-Member better than I ever could :)
    Cheers,
    Fred
    There's no place like 127.0.0.1

  • How to import data from CSV file with columns separated by semicolon?

    I migrate database from MS SQL 2008 to ORACLE 11g
    I export data to CSV file from MS SQL
    then I try to import it to Oracle
    several tables goes fine using Import data option in the SQL Developer
    Standard CSV files with data separated by comma were imported.
    chars, date (with format string), and integer data are imported via import wizard without problems
    the problems were when I try to import table with noninteger numbers with modal part separated by comma not by dot
    comma is the standard separator for columns in CSV file
    so I must change the standard separator to semicolon
    then the import wizard have problem to correct recognize the columns data because it use only standard CSV comma separator :-/
    In SQL Developer 1.5.3 Tools -> Preferences -> Migration -> Data Move Options
    I change "End of Column Delimiter" to ; but it doens't work
    Is this possible to change the standard column separator for import data wizzard in SQL Developer 1.5.3?
    Or maybe someone know how to import data in SQL Developer 1.5.3 from CSV when CSV colunn separator is set to semicolon?

    A new preference has been added to customize the import delimiter in main code line. This should be available as part of future release.

  • How to import csv-file in Numbers 3.2.2.

    I start using Numbers in stead of Excel. I would like to import csv-files from my bank, but when I open the csv-file in Numbers, everything is imported in the same cell. I composed a testfile: 01/08/2014,”text”,”more text”,”even more text” in Pages, exported to a textfile and changed the extension from .txt in .csv. It did not help, everything was in the same cell. What must be changed to become successful in importing csv-files? I am using Numbers 3.2.2. and an iMac with 2,8 GHz Intel Core i7 processor and 8 GB 1067 MHz DDR3 memory with OS X 10.9.4.
    Thanks, Joan Voormolen

    You can do this using Pages. Without using outside scripts or functions. The Pages Find/Replace function will let you change the delimiter on the data in your file.
    Open the file in Pages. Click Show Invisibles. (this will show you the delimiter used in the file)
    If you see a * as the delimiter, that is a space. Some data files are space delimited. This is a really poor way to delimit numerical data files.
    If you see a fat arrow to the right, the file is Tab delimited
    Obviously, a comma is not a hidden character. Some files are comma delimited
    Whatever else might have been used as a delimiter (for example a semi colon is sometimes used) will be apparent.
    The delimiter should be something that is not used anywhere else in the "data"... text, numbers, etc., you want to delimit. Numbers considers a comma as a valid delimiter for files with the suffix .csv . It considers a tab as a valid delimiter with files with the suffix .txt . It does not consider spaces a valid delimiter in with any file suffix. But some programs use odd delimiters (semi colon, colon, double spaces, etc) as delimiters.
    Use the Find command, then Find/Replace as you need to create that delimiter numbers recognizes. Let's say a semi colon was used as a delimiter. Enter the current delimiter (semi colon)  into the Find box. Pages should highlight all the instances of your entry. Enter a comma (to create comma delimited data file) in the Replace box. You should now see a comma as the delimiter.
    Important Don't forget, any other comma used in the file will also be considered a delimiter. (a comma in 1,000 for example). So check the data. If you see a comma used another way you will want to eliminate that BEFORE you do the "comma as delimiter" replacement. If you have 1,000, do a find/replace with comma as the find, nothing as the replace, first. THEN do the replacement of the semi colon.
    Now comes the "tricky" part from what I could see. You want to save this new file with a suffix of .csv. (Export the file) Numbers will only open a comma delimited file with separated data (by comma) if it's suffix is .csv. Pages only gives you limited export options and puts the file suffix on for you automatically. CSV is not one of the options!
    Choose Text. Pages will name the file .txt. Quit Pages. Go to the file on your desktop (or wherever you saved it). Change the file suffiix from .txt to .csv.
    That's it. Open the file with Numbers. Numbers will create a separate column for everything between the comma's.
    You can use this same method to alter your data file before you import it into Numbers. For example, one file I wanted to import had time=xxx . I only wanted the actual time, not the text attached to it, in my spreadsheet. I did a find/replace with "time=" as the find. A comma as the replace. Even though "time=xxx" is one "word", Pages identified the "time=" within the word to allow the replacement.
    Numbers does not provide a "choose delimiter" function when opening a file. Instead it automatically uses the standard delimiter based on the file suffix. CSV means Comma, so if the file is named .csv it will only look for and use a comma as the delimiter to put the data into separate columns. I believe .txt uses only a tab as the delimiter. In the above example you could find/replace to a Tab. Then Export to Text. And numbers will open the data into columns the way you want, without the extra step of renaming the file on your desktop.
    While some files use a second space (ie two in a row) as a delimiter that's a nasty way to delimit. You always want a specific delimiter that is not used within the data element.
    The above is to import numerical data into separate columns. You could use the same method to manipulate a file that contains text. Let's say you had a file with the suffix .txt. In the file are names and addresses.  John Smith 246 Rose Road . You want Name in one column. Address in another.  Look at all the spaces, which ones should be delimiters which not? Are there any delimiters in the file?
    If you open with Pages and choose show invisibles you can see. You might see John Smith --> 246 Rose Road. (the --> will look like a fat arrow in Pages). Numbers will open this file, IF it has .txt as the suffix, based on the Tab,  with name in one column, Address in another.
    Or you might see John*Smith**246*Rose*Road. Even though the creator of this intended two spaces to be a delimiter Numbers does not recognize that. Numbers will put everything into one column. The fix? In Pages, put a tab between name and address. Find/replace two spaces with Tab. Export, as Text.
    Based on what you see (with show invisible active) in Pages, you can use the Find/Replace function to create the specific delimiter you want (tab or comma). You can use that function to manipulate the file easily so the data you want shows up in separate columns. You may need to get clever to accomplish the unique delimiters. You might even need to do two passes with Find/Replace.
    In the instance above  if there was only one space between each element. (not two as a pseudo delimiter) You could replace all spaces with a tab in Pages. Export as Text.  Numbers will open that file with a column for each word (one for John, one for Smith). Then  "Merge" the two cells (columns) you want to put back together. 

  • How to gracefully import CSV files into Numbers.app v3?

    I've posted this as a question at Stack Exchange, also…
    I have a process, which has worked faithfully for years in Numbers '09, whereby I download my Bank account data in CSV format, then drag that data directly into my Numbers sheet (after creating an appropriate number of blank rows).
    This no longer works, and I can't find an option to import csv! A help search within numbers for 'csv' returns a single result which describes exporting.
    I've tried the old method, no dice. Also, the menu option: Insert > Choose… doesn't permit .csv to be selected.
    At the moment, my workaround is:
    drag the CSV onto the Numbers dock or task-switcher icon to create a temp sheet
    select and copy the content
    paste-and-match-format into my desired location
    close don't save the temp file
    Doe anyone know a better way? A hack or hidden flag I can toggle to get the old functionality back?

    Hi David,
    Your CSV file seems to be a hybrid (mongrel). Where did it originate?
    Regions that use a full-stop (.) as as the decimal point use comma (,) as the separator in CSV files. But wait, there is more! CSV can also mean Character Separated Values, and that character could be semi-colon (;) or Tab.
    Are you able to open that file in TextEdit or Pages or Word and replace the separator? Replacing ; with Tab may work.
    I must admit that I have never had trouble with CSV opening in Numbers with a double-click in Finder. For example, my bank statements download with what works in my Region (strings enclosed with "double quotes" and columns separated by commas and numbers with a full-stop as the decimal point. Maybe I am just lucky. .
    Regards,
    Ian.

  • Importing csv with dates

    Hi all,
    I am importing csv files that contain (among others) two columns with dates into Numbers. The dates are all uniformly formatted by dd.mm.yyyy, which is in Germany the usual date format. However, the import changes them into numbers, e.g.
    26.10.2009 becomes 38650
    13.11.2009 becomes 38668
    So, there seams to be some logic behind, but how can I conveniently get the correct date back?
    Thanks for any help.
    Best regards.

    Unfortunately, I wasn't able to change the cell format type to 'date' *after* importing the data, it just remained 'number'.
    However, I found a way to work around the problem: Introducing a new column and using there the function EDATE gave me the original date back! The function takes two arguments, the first I let point to the cell with the strange number, the second I let point to an empty cell.
    EDATE might not be meant to work that way and this feature is not documented, anyway, it worked for me.

  • Numbers '08 importing data and merging data from address book .....

    HI all,
    This is the time of year we have to tot-up all of our kilometers travelled to clients which is a real headache.
    I am really keen to get this automated somehow and would be very grateful for some help.
    Here are the details:
    We use the address book app as our client database which includes name, address and kilometers from our base.
    We have an accounting appcilation which lists all invoices by name, includes a date and I could also input the km in here if needed.
    I would like to create a spread sheet in numbers that will contain a list of all clients invoiced and the kms traveled to their place from our base.
    I can get the client list by getting our accounting software to output the data in CSV format, then input the data into numbers, however, I have a couple of queeries regarding the kms values and the import process ....
    (a) firstly, I used to use in excel a very useful function of importing text from text edit, where I was able to choose what delimited a field, spaces, commas, even just width, does this also exist in Numbers? I have looked with no you.
    (b) next the kms values, is there any automated way to match the client names in my excel sheet and pull in the kms values from the address book field?
    If not, they could be inputed into my accounting software each time I enter a record, it just means a bit more work for me on a daily basis.
    Many thanks in advance for your thoughts on this. I'm sure there is a clever way of getting round this somehow ....

    rmeynie wrote:
    (a) firstly, I used to use in excel a very useful function of importing text from text edit, where I was able to choose what delimited a field, spaces, commas, even just width, does this also exist in Numbers? I have looked with no you.
    Feature unavailable in Numbers '09 too
    (b) next the kms values, is there any automated way to match the client names in my excel sheet and pull in the kms values from the address book field?
    Feature unavailable in Numbers '09 too
    Numbers have no provision to communicate with other applications.
    With Numbers '09, we may fit the gap with AppleScript but there is no AppleScript support in Numbers '08.
    Yvan KOENIG (VALLAURIS, France) samedi 9 avril 2011 09:46:20

  • How do you import CSV, tab, and OFX files into multiple Numbers columns

    This Apple function from Numbers '08 Help "Importing a Document" does not seem to work:
    "You can create a new Numbers spreadsheet by importing a document created in Microsoft Excel or AppleWorks 6. Numbers can also import files in comma-separated value (CSV) format, tab-delimited format, and Open Financial Exchange (OFX) format."
    No amount of experimenting with Import, Export, Save As, Paste and Match Style, or using other applications will enable importing CSV, tab, or OFX files into multiple Numbers columns. Instead, all data is imported into a single Numbers column, which then has to be manually and tediously parsed one data element at a time into columns, one row, and one column at a time.

    Jerrold Green1 wrote:
    Joe,
    They all have worked here. I'm not presently able to try in Numbers 08, but I know I've done them all.
    Just double-clicking a .csv file will open Numbers and display the data in a table. Dragging a .csv file to your Numbers icon on the Dock will open it as a Numbers table. Dragging it to a Sheet in an open Numbers document will make a new table in an existing document, and dragging to a table will insert the csv file into the table you dropped it into.
    CAUTION
    With Numbers '08, CSV files must use the comma as delimiter on every setting of decimal separator.
    Numbers '09 behave differently.
    With your tab-delimited file open in a word processor, copy it, then paste it into a table in an open Numbers document. When doing this, select a cell in the table, but don't double-click into the text field of the cell, then paste.
    Why use this long road when we may import directly Tab Separated Values file (tsv.txt) with Numbers '08 (or '09) ?
    Yvan KOENIG (VALLAURIS, France) jeudi 2 décembre 2010 21:05:36

  • Importing CSV dates - wrong format

    Hi,
    I have some CSV data I want to import into Numbers and the CSV has dates. I work with "British" style dd/mm/yy dates but the CSV is "American" mm/dd/yy. How can I persuade Numbers to translate between the two styles?
    Thanks,
    Dave

    Run this script or drag & drop the csv on the script icon (saved as an application).
    The embedded dates will be changed from US format to English (French) one.
    The edited csv file will be saved in the Temporary items folder an opened by Numbers.
    --[SCRIPT csvUStocsvUSEN]
    --=====
    Yvan KOENIG (VALLAURIS, France)
    2011/01/04
    --=====
    property theApp : "Numbers"
    property permitted : {"public.comma-separated-values-text", "public.csv"}
    --=====
    on run
    if my parle_anglais() then
    set myPrompt to "Choose a csv file…"
    else
    set myPrompt to "Choisir un fichier csv…"
    end if -- parleAnglais
    set allowed to my permitted
    if 5 = (system attribute "sys2") then (*
    it's Mac OS X 10.5.x with a buggued Choose File *)
    set allowed to {}
    end if -- 5 = (system…
    my commun(choose file with prompt myPrompt of type allowed without invisibles) (* un alias *)
    end run
    --=====
    on open (sel)
    my commun(item 1 of sel) (* an alias *)
    end open
    --=====
    on commun(le_csv)
    local uti, en_texte, nom_fichier, p2t
    tell application "System Events"
    try
    set uti to type identifier of disk item ("" & le_csv)
    on error
    set uti to "???"
    end try
    end tell
    if uti is not in permitted then
    if my parleanglais() then
    error "The document “" & le_csv & "” isn’t a csv one !"
    else
    error "Le document « " & le_csv & " » n’est pas un fichier csv !"
    end if
    end if
    set les_lignes to paragraphs of (read le_csv)
    repeat with l from 1 to count of les_lignes
    set une_ligne to item l of les_lignes
    if une_ligne contains "/" then
    set une_ligne to my decoupe(une_ligne, ",")
    repeat with c from 1 to count of une_ligne
    set maybe to my decoupe(item c of une_ligne, "/")
    if (count of maybe) = 3 then
    set item c of une_ligne to my recolle({item 2 of maybe, item 1 of maybe, item 3 of maybe}, "/")
    end if -- count of maybe…
    end repeat
    set item l of les_lignes to my recolle(une_ligne, ",")
    end if
    -- set item l of les_lignes to my remplace(item l of les_lignes, ",", ";") -- Useful for French systems
    end repeat
    set en_texte to my recolle(les_lignes, return)
    set nom_fichier to (do shell script "date +%Y%m%d%H%M%S.csv")
    set p2t to (path to temporary items from user domain)
    set lenouveaucsv to ("" & p2t & nom_fichier)
    tell application "System Events" to make new file at end of p2t with properties {name:nom_fichier}
    set la_longueur to count of en_texte
    write en_texte to file lenouveaucsv
    tell application "System Events"
    repeat while size of file lenouveaucsv < la_longueur
    delay 0.2
    end repeat
    end tell
    tell application "Numbers" to open file lenouveaucsv
    end commun
    --=====
    on decoupe(t, d)
    local oTIDs, l
    set oTIDs to AppleScript's text item delimiters
    set AppleScript's text item delimiters to d
    set l to text items of t
    set AppleScript's text item delimiters to oTIDs
    return l
    end decoupe
    --=====
    on recolle(l, d)
    local oTIDs, t
    set oTIDs to AppleScript's text item delimiters
    set AppleScript's text item delimiters to d
    set t to l as text
    set AppleScript's text item delimiters to oTIDs
    return t
    end recolle
    --=====
    replaces every occurences of d1 by d2 in the text t
    on remplace(t, d1, d2)
    local oTIDs, l
    set oTIDs to AppleScript's text item delimiters
    set AppleScript's text item delimiters to d1
    set l to text items of t
    set AppleScript's text item delimiters to d2
    set t to l as text
    set AppleScript's text item delimiters to oTIDs
    return t
    end remplace
    --=====
    on parle_anglais()
    return (do shell script "defaults read 'Apple Global Domain' AppleLocale") does not start with "fr_"
    end parle_anglais
    --=====
    -- [/SCRIPT]
    Yvan KOENIG (VALLAURIS, France) mardi 4 janvier 2011 09:39:38

  • Excel issues with importing CSV or HTML table data from URL - Sharepoint? Office365?

    Greetings,
    We have a client who is having issues importing CSV or HTML table data as one would do using Excel's Web Query import from a reporting application.  As the error message provided by Excel is unhelpful I'm reaching out to anyone who can help us begin to
    troubleshoot problems affecting what is normal standard Excel functionality.  I'd attach the error screenshot, but I can't because my account is not verified....needless to say it says "Microsoft Excel cannot access  the file https://www.avantalytics.com/reporting_handler?func=wquery&format=csv&logid=XXXX&key=MD5
    Where XXXX is a number and MD5 is an md5 code.  The symptoms stated in the error message are:
    - the file name or path does not exist
    -The file is being used by another program
    -The workbook you are trying to save has the same name as a currently open workbook.
    None of these symptoms are the case, naturally. The user encountered this with Excel2010, she was then upgraded to Excel2013 and is still experiencing the same issue. The output of this URL in a browser (IE, Chrome, Firefox) is CSV data for the affected
    user, so it is not a network connectivity issue.  In our testing environment using both Excel2010 or 2013 this file is imported successfully, so we cannot replicate.  The main difference I can determine between our test environment and the end-user
    is they have a Sharepoint installation and appear to have Office365 as well.
    So,  my question might more appropriately be for Sharepoint or Office365 folks, but I can't be sure they're  a culprit.  Given this - does anyone have any knowledge of issues which might cause this with Sharepoint or Office365 integrated with
    Excel and/or have suggestions for getting more information from Excel or Windows other than this error message?  I've added the domain name as a trusted publisher in IE as I thought that might be the issue, but that hasn't solved anything.  As you
    can see its already https and there is no authentication or login - the md5 key is the authentication.  The certificate for the application endpoint is valid and registered via GoDaddy CA.
    I'm at a loss and would love some suggestions on things to check/try.
    Thanks  -Ross

    Hi Ross,
    >> In our testing environment using both Excel 2010 and 2013 this file is imported successfully, so we cannot replicate.
    I suspect it is caused by the difference of web server security settings.
    KB: Error message when you use Web query to a secure Web page (HTTPS://) in Excel: "Unable to open"
    Hope it will help.
    By the way, this forum is mainly for discussing questions about Office Development (VSTO, VBA and Apps for Office .etc.). For Office products feature specific questions, you could consider posting them on
    Office IT Pro forum or Microsoft Office Community.
    Regards,
    Jeffrey
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Address Book -- Importing CSV File created by Numbers

    I'm trying to import a csv file generated from MS outlook into address book. When I attempt to import the csv file that Outlook created, Address Book is able to recognize the file. However, I need to modify the file before importing. To do that, I opened in Numbers, deleted some columns and renamed some columns. Then, I exported from Numbers as a .CSV file. However, when I try to import the .CSV file created by numbers, I get the error that I have modified with Numbers, I get the error "Text file import failure".
    Does anybody know why address book can't import a CSV file created by Numbers?

    Many people have run into this problem, including myself. I had worked many hours on a spreadsheet in Numbers, exported to CSV, and received the error message when trying to import into Address Book. The answers to this dilemma are out there, but tidbits of the whole answer are spread around discussion boards. So I hope to consolidate those answers here.
    The main problem for me -- and it's reasonable to assume that others receive the "Text File import error" for the same reason -- is that 1) I had commas in my spreadsheet, and 2) I had hidden RETURNs in the spreadsheet. Once I got rid of those two things, I had no problem importing into Address Book.
    Deleting Commas>
    The problem with commas in your spreadsheet is that the CSV format uses commas to distinguish when a new cell is formed. So having other commas will inevitably confuse Address Book during the attempted import. I didn't have too many commas in my spreadsheet, so I was able to quickly remove them. Yet, if you have dozens or hundreds of cells with commas in them, you'll need an easier solution. I imagine opening Number's Inspector>Cell Inspector>Format will have the solution of removing commas from, say, currency amounts or something else. Yet, how many commas arise in contact information? Perhaps the easiest way is to use the same method of removing those hidden RETURNs. Read on...
    Deleting Hidden RETURNs>
    You can't see them, and I couldn't find a "show invisibles" option in Numbers. So you need to search and find them. Yet, how do you search for something hidden? Do the Command-F thing to bring up the search field. The search bar should automatically be ready to search what you type. Hitting the Return key will do nothing for you, but hitting Shift-Option-Return will (you'll likely need to hit Return again to actually perform the search). Numbers will point out how many times these hidden returns are in your spreadsheet, which cells contain them, and give you the option to automatically replace them with something else (a space is a safe option). You can do the same search and replace with commas too.
    Save your spreadsheet, export it as CSV, and -- as long as the only errors stemmed from commas and hidden RETURNs -- you shouldn't have a problem having Address Book import it. Good luck!
    PS- After importing my spreadsheet, I noticed that some of my Smart Groups in Address Book were not showing some people who should have automatically been in there. The problem was that the Smart Group search had straight apostrophes in it, but the imported contact had curved apostrophes. The computer saw these as two unrelated characters. After some copying and pasting, the problem was solved.

  • Using PowerShell to import CSV data from Vendor database to manipulate Active Directory Users

    Hello,
    I have a big project I am trying to automate.  I am working in a K-12 public education IT Dept. and have been tasked with importing data that has been exported from a vendor database via .csv file into Active Directory to manage student accounts. 
    My client wants to use this data to make bulk changes  to student user accounts in AD such as moving accounts from one OU to another, modifying account attributes based on State ID, lunchroom ID, School, Grade, etc. and adding new accounts / disabling
    accounts for students no longer enrolled.
    The .csv that is exported doesn't have headers that match up with what is needed for importing in AD, so those have to be modified in this process, or set as variables to get the correct info into the correct attributes in AD or else this whole project is
    a bust.  He is tired of manually manipulating the .csv data and trying to get it onto AD with few or no errors, hence the reason it has been passed off to me.
    Since this information changes practically daily, I need a way to automate user management by accomplishing the following on a scheduled basis.
    Process must:
    Check to see if Student Number already exists
    If yes, then modify account
    Update {School Name}, {Site Code}, {School Number}, {Grade Level} (Variables)
    Add correct group memberships (School / Grade Specific)
    Move account to correct OU (OU={Grade},OU=Students,OU=Users,OU={SiteCode},DC=Domain,DC=net)
    Remove incorrect group memberships (School / Grade Specific)
    Set account status (enabled / disabled)
    If no, create account
    Import Student #
    Import CNP #
    Import Student name
    Extract First and Middle initial
    If duplicate name exists
    Create log entry for review
    Import School, School Number, Grade Level
    Add to correct Group memberships (School / Grade Specific)
    Set correct OU (OU={Grade},OU=Students,OU=Users,OU={SiteCode},DC=Domain,DC=net)
    Set account Status
    I am not familiar with Powershell, but have researched enough to know that it will be the best option for this project.  I have seen some partial solutions in VB, but I am more of an infrastructure person instead of scripting / software development. 
    I have just started creating a script and already have hit a snag.  Maybe one of you could help.
    #Connect to Active Directory
    Import-Module ActiveDirectory
    # Import iNOW user information
    $Users = import-csv C:\ADUpdate\INOW_export.csv
    #Check to see if the account already exists in AD
    ForEach ( $user in $users )
    #Assign the content to variables
    $Attr_employeeID = $users."Student Number"
    $Attr_givenName = $users."First Name"
    $Attr_middleName = $users."Middle Name"
    $Attr_sn = $users."Last Name"
    $Attr_postaldeliveryOfficeName = $users.School
    $Attr_company = $users."School Number"
    $Attr_department = $users."Grade Level"
    $Attr_cn = $Attr_givenName.Substring(0,1) + $Attr_middleName.Substring(0,1) + $Attr_sn
    IF (Get-ADUser $Attr_cn)
    {Write-Host $Attr_cn already exists in Active Directory

    Thank you for helping me with that before it became an issue later on, however, even when modified to be $Attr_sAMAaccountName i still get errors.
    #Connect to Active Directory
    Import-Module ActiveDirectory
    # Import iNOW user information
    $Users = import-csv D:\ADUpdate\Data\INOW_export.csv
    #Check to see if the account already exists in AD
    ForEach ( $user in $users )
    #Assign the content to variables
    $Attr_employeeID = $users."Student Number"
    $Attr_givenName = $users."First Name"
    $Attr_middleName = $users."Middle Name"
    $Attr_sn = $users."Last Name"
    $Attr_postaldeliveryOfficeName = $users.School
    $Attr_company = $users."School Number"
    $Attr_department = $users."Grade Level"
    $Attr_sAMAccountName = $Attr_givenName.Substring(0,1) + $Attr_middleName.Substring(0,1) + $Attr_sn
    IF (Get-ADUser $Attr_sAMAccountName)
    {Write-Host $Attr_sAMAccountName already exists in Active Directory
    PS C:\Windows\system32> D:\ADUpdate\Scripts\INOW-AD.ps1
    Get-ADUser : Cannot convert 'System.Object[]' to the type 'Microsoft.ActiveDirectory.Management.ADUser'
    required by parameter 'Identity'. Specified method is not supported.
    At D:\ADUpdate\Scripts\INOW-AD.ps1:28 char:28
    + IF (Get-ADUser $Attr_sAMAccountName)
    + ~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidArgument: (:) [Get-ADUser], ParameterBindingException
    + FullyQualifiedErrorId : CannotConvertArgument,Microsoft.ActiveDirectory.Management.Commands.GetAD
    User

Maybe you are looking for