calling a paricular data from excel sheet

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rnm7228
    New Member
    • Oct 2008
    • 3

    calling a paricular data from excel sheet

    I want to extract one property of steam say enthalpy for a particular pressure and temperature from a table which has a list for pressures, temperatures and enthalpy, these data is stored in an excel file how do I call these particular value of enthalpy in c++ programme
  • archonmagnus
    New Member
    • Jun 2007
    • 113

    #2
    Ah, a fellow thermodynamist! Unfortunately, you wouldn't be able to extract data from an excel file directly without knowing the filetype specification. Excel files are "binary" and data cannot be read using C++ as you would do with a simple ASCII data file. You would have to read a bytestream and parse the data according to the specification to find the particular thermal property reference of interest.

    Here's a link to the specification.

    Comment

    • rnm7228
      New Member
      • Oct 2008
      • 3

      #3
      Originally posted by archonmagnus
      Ah, a fellow thermodynamist! Unfortunately, you wouldn't be able to extract data from an excel file directly without knowing the filetype specification. Excel files are "binary" and data cannot be read using C++ as you would do with a simple ASCII data file. You would have to read a bytestream and parse the data according to the specification to find the particular thermal property reference of interest.

      Here's a link to the specification.
      in that case please advise what should be done as I have to enter enthalpy at any cost no other go

      Comment

      • donbock
        Recognized Expert Top Contributor
        • Mar 2008
        • 2427

        #4
        Originally posted by archonmagnus
        Ah, a fellow thermodynamist! Unfortunately, you wouldn't be able to extract data from an excel file directly without knowing the filetype specification. Excel files are "binary" and data cannot be read using C++ as you would do with a simple ASCII data file. You would have to read a bytestream and parse the data according to the specification to find the particular thermal property reference of interest.

        Here's a link to the specification.
        Actually, you can export from Excel into a CSV (comma separated values) file. This is a text file where each rows are separated by newlines and columns are separated by commas. You should find it easier to parse the CSV file.

        Comment

        • archonmagnus
          New Member
          • Jun 2007
          • 113

          #5
          Originally posted by donbock
          Actually, you can export from Excel into a CSV (comma separated values) file. This is a text file where each rows are separated by newlines and columns are separated by commas. You should find it easier to parse the CSV file.
          True that could be done, but if the OP's spreadsheets are those typical of the thermodynamical analytics field, they tend to have formulae and macros and cross references and sharks with lasers on their heads. Trust me, I speak from experience. I spent a good portion of last year converting those types of spreadsheet/VB macro calculation files into "real" programs that were much easier to use.

          Comment

          Working...