How do Import a csv file that contains strings

I have a file that contains numbers as US formmated $$$  such as $1,123,123,123  I have a perl script on one of our linux servers that creates the csv file as
"Total Dollars","$1,123,123,123","some other string","etc"  but when I import the file into numbers
Unnamed Table
Average Price'
$160
686'
$222
482'
$114
820'
$188
062'
I cant find a setting anywhere that says to ignore commas inside a string.  This works in most other applications.

I apologize but you wrote :
WALTER-MILANO-ITALY wrote:
You should be now able to import the file using ; as separator or if you prefer you can do again the change  of ; with ,
It's not a matter of preferences. The OP can't import a file whose values are separated by semi-colons.
He must replace them by commas.
With your scheme :
Original datas
'Total Dollars','$1,123,123,123','some other string','etc'
after your step 1
'Total Dollars';'$1,123,123,123','some other string','etc'
after your step 2
'Total Dollars';'$1,123,123,123''some other string''etc'
and the datas are completly unusable
A possible scheme would be :
Original datas
'Total Dollars','$1,123,123,123','some other string','etc'
'Totals Dollars','$12,123,123,123’,’blahblah’,’etc'
after possible step 1 (replace ‘,’ by ",")
'Total Dollars";"$1,123,123,123";"some other string";"etc'
'Totals Dollars";"$12,123,123,123";"blahblah";"etc'
after possible step 2 (replace single ‘ by ")
"Total Dollars";"$1,123,123,123";"some other string";"etc"
"Totals Dollars";"$12,123,123,123";"blahblah";"etc"
after possible step 3 (replace ";" by ",")
"Total Dollars","$1,123,123,123","some other string","etc"
"Totals Dollars","$12,123,123,123","blahblah","etc"
This one may be imported by Numbers on thez OP’s machine.
I don't know if these changes may be done with Perl but I know that they are easy to do with AppleScript.
But honestly, if Perl is able to build a TAB separated values file, it would be more efficient.
Yvan KOENIG (VALLAURIS, France) mercredi 25 janvier 2012
iMac 21”5, i7, 2.8 GHz, 12 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.2
My Box account  is : http://www.box.com/s/00qnssoyeq2xvc22ra4k

Similar Messages

  • How to import a csv file without "+" being added to numbers?

    I'm trying to import a csv file from my bank. Numbers automatically adds a "+" and "-" sign before all numbers. Numbers won't add the numbers with a + sign. How can I easily remove the + sign? It seems the delimiter in the csv file may be ", rather than , Thanks.

    Wayne,
    I don't believe that the plus sign came from Numbers. Except for a purposful application of a Custom Format, Numbers isn't going to add the plue sign. The minus sign is another issue. It's a perfectly acceptable part of the value and shouldn't cause a problem.
    If the plus sign came from the CSV file, which you seem to imply isn't the case, you would have to strip it out before submitting to Numbers.
    Jerry

  • How to import an .csv file into the database?

    and can we code the program in JSP to import the.csv file into the database.

    It is better to use Java class to read the CSV file and store the contents in the database.
    You can use JSP to upload the CSV file to the server if you want, but don't use it to perform database operations.
    JSPs are good for displaying information on the front-end, and for displaying HTML forms, there are other technologies more suitable for the middle layer, back end and the database layer.
    So break you application into
    1) Front end - JSPs to display input html forms and to display data retrieved from the database.
    2) Middle layer - Servlets and JavaBeans to interact with JSPs. The code that reads the CSV file to parse it's contents should be a Java Class in the middle layer. It makes use of Java File I/O
    3) Database layer - Connects to the database using JDBC (Java Database Connectivity), and then writes to the database with SQL insert statements.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Keeping the above concepts in mind, first build a simple JSP and get it to work,
    then research on Google , for Java File I/O , discover how to read a file,
    Then search on how to readh a CSV file using Java.
    After researching you should be able to read the CSV file line by line and store each line inside a Collection.
    Then research on Google, on how to write to the database using JDBC
    Write a simple program that inserts something to a dummy table in the database.
    Then, read the data stored in the Collection, and write insert statements for each records in the collection.

  • How to import from CSV file into INTERVAL DAY TO SECOND column?

    Hello,
    I need to import data from a csv file that has a column that stores time-intervals (e.g. 2:06:02 Hours:Minutes:Seconds) into a table column INTERVAL DAY TO SECOND.
    Does any of you know what format I should apply?
    I tried HH:MI:SS but it didn't work.
    Any suggestion is welcomed (including changing the column type to something else that might hold time-intervals in it....).
    Thanks,
    Andrei

    Andrei,
    There is no native support for the INTERVAL datatype in the Text loading facilities of Application Express.
    To work around this known limitation, I suggest either creating a temporary table or a shadow column in your existing table. You could then upload your data for the interval as a VARCHAR2 and then use SQL to convert to an appropriate interval value.
    For example:
    1) Create a table with:
    create table foo (id number primary key, i interval day to second, shadowi varchar2(4000) )2) Using your sample data set, load this data into table FOO, loading the second column of this data into column SHADOWI
    1     01:06:02
    2     02:06:02
    3     03:01:013) Issue the following SQL to convert the value in your shadow interval column to your actual interval column
    update foo set i = to_dsinterval( '0 ' || shadowi )Note that you'll need to prepend the '0' to formulate a valid interval literal value.
    Joel

  • How to import a csv file and read  in sap ui5?

    Hi,
    I want to import a file and read it contents to bind it to table.How to do it?
    Thanks in advance.

    I tried to do this all from within the application but found it easier to just start with a JSON file. But, you can use a JS library to convert your CSV into JSON from within the application like this one:
    archan937/csonv.js · GitHub
    I just converted my CSV to JSON. Once you have that, all you need to do is instantiate a model for it and bind to table.
      onInit: function () {
        var oModel = new sap.ui.model.json.JSONModel("PATH TO YOUR JSON FILE");
        this.getView().setModel(oModel);
      <Table id="idProductsTable"
        inset="false"
        items="{
          path: '/ProductCollection',
          sorter: {
            path: 'Name'
        }">
    The UI5 demo kit is a good resource. I believe it'll be same/similar for SAPUI5:
    OpenUI5 SDK - Demo Kit
    See here for example of defining your model and binding to a table:
    sap.m Explored

  • How to import a CSV file into Appleworks

    Does anybody knows? I tried using ASCII format (everything goes into one cell), Excel (not recognized). Very fustrated, I can do that in 2 seconds with Excel or Open Office.
    Any help will be really appreciated, must be something really sily

    Roger, you are right. But instead of using a word processort I fixed the file with Perl (much faster in my case):
    auyan:~/Desktop josevnz$ perl -p -i -e 's#,#\t#g; s#\n#\rn#;' 401k-funds-appleworks.csv
    I have to say than Appleworks ***** big time .
    Thanks for your help, very valuable tip!

  • How to save an illustrator file that contains gradients as a pdf print file without the gradients streaking on the print

    When I create files in Adobe Illustrator, Photoshop, and Indesign if the design includes gradients and I save or export it as a pdf for print, whenever I have the file printed the gradients often come out with lines and streaks in the print. I usually work around this by copying the gradient to a file of its own, save it as a jpeg, and then insert the jpeg back into the original file before saving it as a pdf. This can be a big hassle and I was wondering if there's a setting in illustrator, photoshop, and Indesign in order to avoid the hassle.

    You would have to check your color management and things like overprint settings or the ink levels of the color components. Streaking is usually a sign of areas getting oversaturated and the automatic adjustments in the printer driver being unable to compensate. and then of course other factors may figure in like banding inherent in using gradients across large areas, out of gamut issues for certain colors and what have you. You'd have to be much more specific about all of that for anyone to even begin to advise specifically...
    Mylenium

  • HT4489 how do I import a csv file to icloud?

    Does any one know how to import a .csv file (in Excel) into iCloud so I can transfer my contacts to my iPhone? Thanks!

    This may be a little to late, but you sign on to icloud.com and click contacts, in the bottom right corner there will be the gear simple click that and click import csv.

  • Importing a CSV file into AD 2012r2

    Hi Guys
    Just wondering if anyone can help, I am a newbie on scripting and finding it really difficult to understand how to import a csv file into AD
    I have created the CSV file with the following headers, see below but I am unable to write a powershell script to import them into AD which work, I have tried multiple help guides but still cannot do it for the life of me.
    Any help on this would be really appreciated 
    objectClass user
    cn Jo bloggs
    givenName jo
    sn blogs
    mail [email protected]
    sAMAccountname j.blogs
    AccountPassword Pa$$w0rd
    ChangePasswordAtLogon true
    PasswordNeverExpires false
    ou OU=staff,DC=test,DC=com

    Import-Csv C:\User.csv| %{New-ADUser -SamAccountName $_.SamAccountName `
    -UserPrincipalName $_.userprinicpalname `
    -Name $_.name `
    -Mail = $_.mail `
    -DisplayName $_.name `
    -GivenName $_.GivenName `
    -Path "OU=Test Users,DC=XXX,DC=XXX" `
    -PasswordNeverExpires $false `
    -ChangePasswordAtLogon $true `
    -AccountPassword (ConvertTo-SecureString "test41;" -AsPlainText -force) `
    -Enabled $True -PasswordNeverExpires $True -PassThru ` }
    help New-ADUser -Examples
    You can try the below sample code
    Regards Chen V [MCTS SharePoint 2010]

  • Import from a camera that contains mts files

    what is the required file structure for FCE to import from a camera that contains mts files

    The file structure is provided/created automatically by the camera....
    So if you still have the original structure, then you should be fine, but you may need to install software for log and transfer from the camera manufacturer...
    If you just have the individual mts file, you are SOL as far as log and transfer goes. In that case you need to purchase ClipWrap2 to convert to Pro Res....
    Not sure how this all works with FC Express though...

  • How do I import a CSV file of contacts as a new contact list?

    How do I import a csv contact file in to my Thunderbird account as a separate Contact list?

    I have done everything I can think of. I have imported CSV files in the past, but now that i've upgraded Thunderbird, there is no option to import CSV files. It says
    Import Everything
    or select the type of material to import:
    Address Books
    Mail
    Feed Subscriptions
    Settings
    Filters
    I have tried all of them and nothing allows me to import anything but Outlook Express when I choose everything. The others give me some options, but I can only import outlook CSV files. I don't have Outlook on my computer, nor do I have Eurdora nor Windows live mail, which comes up under settings. Feeds will not accept CSV files. Nothing seems to take these files any more. I put them in Openoffice spreadsheet and tried to move them from there, but that didn't work either.

  • I am trying to import standard midi file that I created in Band in a Box into Logic Pro 9.  I can not get all the track to play with internal instrument sounds... only the piano track.  how can I get the others to play... drums, bass etc????   Help

    I am trying to import standard midi file that I created in Band in a Box into Logic Pro 9.  I can not get all the track to play with internal instrument sounds... only the piano track.  how can I get the others to play... drums, bass etc????   Help

    Don't drag the midi into an open Logic project. The tracks won't set up correctly.
    'Open' the midi file with Logic as if it were a Logic project. Then all the tracks will be set up so you can start editing them and applying better saved sounds and instruments, but you'll be at a starting place where you can hear what's going on.

  • HT203433 How do I retrieve an app that I bought.  The icon is in my library.  But the program isn't in my device. When I look in the file that contain the app and try to open it,  It doesn't open.

    How do I retrieve an app that I bought.  The icon is in my library.  But the program isn't in my device. When I look in the file that contains the app and try to open it, it doesn't open.

    Howdy Hestersfree,
    This can be done through the App Store on the device that you'd like the app installed on.
    Apps on iOS
    Open the App Store on your device.
    Make sure you are signed in with the same Apple ID used for the original purchase.
    Tap Updates from the bottom navigation bar. 
    Tap Purchased on the resulting screen.
    Locate the app in your Purchased tab.
    Tap the download button.
    The app will begin downloading and you'll be taken back to your home screen. 
    Downloading past purchases from the App Store, iBookstore, and iTunes Store
    http://support.apple.com/kb/HT2519
    Cheers,
    Allen

  • How do you import a video file that has extension gp into i movie.  also rotating video

    How do you import a video file that has the extension gp into ivmovie?  Also how do you rotate a video . (the video was taken from a phone.)

    Hi, your video file needs to be converted to eg. a .mov or .mp4 file before iMovie will recognise. I use 4Media MP4 converter and it works excellent.
    For the rotating I do not have an answer, but if you would manege you would end up with a very narrow image either way.
    Good luck

  • How do i import a csv file to icloud

    I'm a former blackberry user and trying to upload a .csv file to iCloud.  Is it possible?

    Check out this thread >  Can you import a csv file into iCloud?

Maybe you are looking for

  • Can a template created in Pages be used in Word?

    I need to create a document template that will be used in Microsoft Word. Can I create it in Pages?

  • Newbie: Trying to import from an old camcorder DVD

    Hi, Bit of a vague question but hope someone can help. I have been given a DVD+RW which was taken directly out of an old (>3yrs) home camcorder. - When I put the DVD into my home DVD player (the standard gadget connected to the telly), it works fine:

  • How to generate web services for MDM Taxanomy Tables?

    Hi Experts, I have a Taxonomy table called eClass in material repository which contains the Hierarchical data. The data[Attributes of this table ] can be seen only in Taxonomy Mode, I want to generate the web service using MDM Web Service Generator.

  • Downloaded movie genres

    After downloading a movie from iTunes I change the genre to suit the location of where iwant it in iTunes. This works but eventually the movie will go back into its original genre but will show my edited genre when I go back into the movie info. An a

  • Saving music library while uninstalling i Tunes.

    I can't access Gracenote when importing CD's, so I cannot get track info. I cannot instal updates for iTunes - it just don't work - so what if I uninstall iTunes and then reinstall it? Will I lose my library of music? This is the most important quest