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. Formula from CSV to tableView
Forum Updated to NodeBB v4.3 + New Features

Formula from CSV to tableView

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 293 Views 2 Watching
  • 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.
  • A Offline
    A Offline
    aim0d
    wrote on last edited by aim0d
    #1

    Thanks to this video I found a way on how to copy my CSV file in a tableView.
    But I was wondering, is there a way to also have the formula (like =SUM(n1; n2)) from CSV to tableView? Because at the moment I only visualize the result number in the cell and not the formula underneath

    JonBJ 1 Reply Last reply
    0
    • A aim0d

      Thanks to this video I found a way on how to copy my CSV file in a tableView.
      But I was wondering, is there a way to also have the formula (like =SUM(n1; n2)) from CSV to tableView? Because at the moment I only visualize the result number in the cell and not the formula underneath

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

      @aim0d
      Your topic title reads

      Formula from CVS to tableView

      Note that CVS is a US pharmacy chain, not a Excel-type file format. It probably sells baby formula :)

      Sure you can choose to put =SUM(n1; n2) as the content of a cell if you want. You can even store both that and the result, 42 or whatever, under separate roles in the table view's model. I can't find it now, but somewhere in docs there is a mention that in a spreadsheet model you might store a cell's formula under its EditRole and the formula's calculated value under its DisplayRole, or even dynamically compute that and return it from data(DisplayRole) override.

      But nothing is going to actually do that formula calculation for you --- you have to write that code!

      A 1 Reply Last reply
      2
      • JonBJ JonB

        @aim0d
        Your topic title reads

        Formula from CVS to tableView

        Note that CVS is a US pharmacy chain, not a Excel-type file format. It probably sells baby formula :)

        Sure you can choose to put =SUM(n1; n2) as the content of a cell if you want. You can even store both that and the result, 42 or whatever, under separate roles in the table view's model. I can't find it now, but somewhere in docs there is a mention that in a spreadsheet model you might store a cell's formula under its EditRole and the formula's calculated value under its DisplayRole, or even dynamically compute that and return it from data(DisplayRole) override.

        But nothing is going to actually do that formula calculation for you --- you have to write that code!

        A Offline
        A Offline
        aim0d
        wrote on last edited by
        #3

        @JonB Oh shoot, u right; i keep writing the extention wrong :(

        It thought that too: having to actually wrote the code and don't automatically

        thnks

        1 Reply Last reply
        0

        • Login

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