Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Writing into CSV file.
Qt 6.11 is out! See what's new in the release blog

Writing into CSV file.

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 3 Posters 278 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    Pariposh
    wrote on last edited by
    #1

    Hey Everyone,
    Im trying to get some data from signal analyzer and append it into a csv file but the data which is getting updated in csv file is coming as 5e6549a4-a292-463f-803e-e50ca7c85d14-image.png 4.63E-204
    and similar numbers like that , i want integers to be printed in the columns
    below is the code snippet :

    QFile file("./file.csv");
    file.open(QIODevice::WriteOnly | QIODevice::Text);
    QTextStream out(&file);
    out<<"Frequnecy , Measure Peak Frequency , Measured Tx Power, Measured Spurious Power , Measured Spurious Frequency\n";
    *
    *
    Return_value.append(",");
    Return_value.append(PK_VALUE);
    *
    *
    out<<Return_value<<"\n";

    Thanks Looking forward for a suggestion.

    JonBJ 1 Reply Last reply
    0
    • P Pariposh

      Hey Everyone,
      Im trying to get some data from signal analyzer and append it into a csv file but the data which is getting updated in csv file is coming as 5e6549a4-a292-463f-803e-e50ca7c85d14-image.png 4.63E-204
      and similar numbers like that , i want integers to be printed in the columns
      below is the code snippet :

      QFile file("./file.csv");
      file.open(QIODevice::WriteOnly | QIODevice::Text);
      QTextStream out(&file);
      out<<"Frequnecy , Measure Peak Frequency , Measured Tx Power, Measured Spurious Power , Measured Spurious Frequency\n";
      *
      *
      Return_value.append(",");
      Return_value.append(PK_VALUE);
      *
      *
      out<<Return_value<<"\n";

      Thanks Looking forward for a suggestion.

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by JonB
      #2

      @Pariposh
      And are the values which you are writing indeed (valid) integers? Because 4.63E-204 is equal to 4.63 / (10^204), i.e. a very small number with 204 0s after the decimal point!! And not an integer anyway. Show a qDebug() of which value is producing that output.

      1 Reply Last reply
      2

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved