+ Reply to Thread
Results 1 to 8 of 8

Data format conversion to export from a .csv file to excel

Hybrid View

mujikajulen Data format conversion to... 03-01-2024, 06:33 AM
DJunqueira Re: Data format conversion to... 03-01-2024, 06:47 AM
mujikajulen Re: Data format conversion to... 03-01-2024, 07:01 AM
shina67 Re: Data format conversion to... 03-01-2024, 07:27 AM
mujikajulen Re: Data format conversion to... 03-01-2024, 07:58 AM
ByteMarks Re: Data format conversion to... 03-01-2024, 07:30 AM
AliGW Re: Data format conversion to... 03-01-2024, 07:59 AM
DJunqueira Re: Data format conversion to... 03-01-2024, 08:10 AM
  1. #1
    Registered User
    Join Date
    03-01-2024
    Location
    Bizkaia
    MS-Off Ver
    2021
    Posts
    3

    Data format conversion to export from a .csv file to excel

    Hey! I have a file full of resistor value variations obtained from a Monte Carlo analysis. The format of the values is the following: "9.91536e-01". The problem is that qhen i import this values in excel, this same value appears to be "99153.6", instead of the "0.991536" value.

    I know its because the format doesnt read the "." as a decimal separator. I've tried changing it but the problem keeps happening.
    Last edited by mujikajulen; 03-01-2024 at 08:01 AM.

  2. #2
    Forum Expert
    Join Date
    10-19-2021
    Location
    Brazil
    MS-Off Ver
    Office 365 V2401 w/ Win10 Home 64 Bit
    Posts
    2,014

    Re: Data format conversion to export from a .csv file to excel

    Welcome to the forum.

    The best tool to deal with this impor issues is Power Query (native Excel tool), it can import and take care of the decimal, but to help you further we need some file.

  3. #3
    Registered User
    Join Date
    03-01-2024
    Location
    Bizkaia
    MS-Off Ver
    2021
    Posts
    3

    Re: Data format conversion to export from a .csv file to excel

    Thank you for your reply!

    The file would be the following:

    MC2.csv

    (im sorry if the file doesnt upload correctly, its my first time)

    And once I'm in the Power Query, where should I go to change the format? I can`t find the option.

  4. #4
    Forum Contributor
    Join Date
    01-13-2016
    Location
    Sheffield, England
    MS-Off Ver
    2016
    Posts
    216

    Re: Data format conversion to export from a .csv file to excel

    It seems like Excel is interpreting the values incorrectly due to the decimal separator. You can try the following steps to resolve the issue:

    Change Decimal Separator: Ensure that Excel is configured to use the correct decimal separator. You can do this by going to Control Panel > Clock and Region > Region > Additional settings, and then changing the Decimal symbol to "." (dot).

    Format Cells: After importing the data, select the column containing the resistor values, right-click, and choose Format Cells. In the Number tab, select Number or Decimal, and set the appropriate number of decimal places.

    Text to Columns: If the values are still not displayed correctly, try using the Text to Columns feature. Select the column with the resistor values, go to the Data tab, and click Text to Columns. Choose Delimited, click Next, uncheck all delimiters, click Next again, and then choose General or Number format.

    Custom Format: If none of the above methods work, you can use a custom format. Select the column with the resistor values, right-click, and choose Format Cells. In the Number tab, select Custom, and then enter "0.000000" as the format code. This will force Excel to display the values with six decimal places.

    By following these steps, you should be able to display the resistor values correctly in Excel. If you continue to encounter issues, feel free to ask for further assistance!

  5. #5
    Registered User
    Join Date
    03-01-2024
    Location
    Bizkaia
    MS-Off Ver
    2021
    Posts
    3

    Re: Data format conversion to export from a .csv file to excel

    Okay, I solved it. Thank you! It was indeed a format problem

  6. #6
    Forum Expert
    Join Date
    07-23-2018
    Location
    UK
    MS-Off Ver
    O365 32bit (Windows)
    Posts
    2,977

    Re: Data format conversion to export from a .csv file to excel

    Have you tried just importing the csv via the Data tab? Seems to work for me.
    Attached Images Attached Images

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,404

    Re: Data format conversion to export from a .csv file to excel

    If that takes care of your original question, please choose Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, if you have not already done so, remember that you can thank anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of each of those who offered help.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  8. #8
    Forum Expert
    Join Date
    10-19-2021
    Location
    Brazil
    MS-Off Ver
    Office 365 V2401 w/ Win10 Home 64 Bit
    Posts
    2,014

    Re: Data format conversion to export from a .csv file to excel

    With Power Query I managed to import the file as text, but once inside of PQ you can any transformation.

    Formula: copy to clipboard
    let
    Fonte = Csv.Document(File.Contents("D:\Users\DomingosJunqueira\Downloads\MC2.csv"),15,"",ExtraValues.Ignore,65001),
    #"Alterar Tipo" = Table.TransformColumnTypes(Fonte,{{"Column1", type text}, {"Column2", type text}, {"Column3", type text}, {"Column4", type text}, {"Column5", type text}, {"Column6", type text}, {"Column7", type text}, {"Column8", type text}, {"Column9", type text}, {"Column10", type text}, {"Column11", type text}, {"Column12", type text}, {"Column13", type text}, {"Column14", type text}, {"Column15", type text}}),
    #"Colunas Removidas" = Table.RemoveColumns(#"Alterar Tipo",{"Column15"}),
    #"Cabeçalhos Promovidos" = Table.PromoteHeaders(#"Colunas Removidas", [PromoteAllScalars=true])
    in
    #"Cabeçalhos Promovidos"
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Simple Excel sheet data to .Dat format conversion
    By zaska in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-28-2013, 09:38 PM
  2. Conversion of Excel data into Txt file as per the Scheduled time
    By Shiva Prasad P in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-05-2013, 04:34 PM
  3. Export a text File in to an excel and format it
    By Aashiq_ilahi in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-14-2012, 06:22 AM
  4. Export Excel data to txt file in special format
    By tan123 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-05-2010, 05:19 PM
  5. Replies: 3
    Last Post: 11-09-2009, 01:33 PM
  6. Replies: 1
    Last Post: 12-14-2005, 05:00 PM
  7. [SOLVED] Excel 2003 to 95 File format conversion
    By Judith C in forum Excel General
    Replies: 3
    Last Post: 07-17-2005, 12:05 PM
  8. conversion to qif or ofx file format
    By RCofCupertino in forum Excel General
    Replies: 1
    Last Post: 04-11-2005, 06:06 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1