How do i extract data from an excel file and use it in a c program?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Agnel
    New Member
    • Jan 2016
    • 2

    How do i extract data from an excel file and use it in a c program?

    I have data (a 2D array) in Excel. I need to import the data to my program in C and use it in the logic. Then I also want to store my final answer in another excel file.
    How do i go about this?
  • weaknessforcats
    Recognized Expert Expert
    • Mar 2007
    • 9214

    #2
    You will need to export your Excel spreadsheet to a file and read that file into your C program. The C program can output the result in a file format readable by Excel.

    In Excel, select File then Export and then choose the file format you wish to use. (Excel 2016).

    Comment

    • Agnel
      New Member
      • Jan 2016
      • 2

      #3
      By file do you mean a .txt file?
      Last edited by Agnel; Jan 18 '16, 05:53 AM. Reason: Word missing

      Comment

      • weaknessforcats
        Recognized Expert Expert
        • Mar 2007
        • 9214

        #4
        A .txt file is one option. There is also the .csv file for comma-separated-values. A .csv file is handy because all the values ae between commas so you can parse the file in the C program.

        Check your Excel export file types options.

        Comment

        Working...