Files interaction with softwares

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Arena4D
    New Member
    • Mar 2013
    • 1

    Files interaction with softwares

    Hello,
    It is commonly seen that computational applications accept data in notepad or excel formats to do the process on. The question is how would they do that? Do they store the notepad data somewhere in the application memory or they interact with the notepad file all the time program is running? This is my first try developing a small application . Thank you.
  • weaknessforcats
    Recognized Expert Expert
    • Mar 2007
    • 9214

    #2
    Notepad data is just a text file. There are no formatting rules. Your progrsm just writes a text file and Notepad can read it. Conversely, anything in a Notepad file can be read in your program by opening the .txt file and callng fgets.

    Excel is a different matter. Here cnverters are used. There is one that converts a .csv file to Excel .xlsx and another that converts .xlsx to .csv.

    The .csv file is the one your program reads or writes. These are comma-separated-value files. Here each data item is separated from the next one by a comma. When the end of the file is reached (\n) then that is tne end of your Excel row. Each data tiem is put in a column.

    .csv files are just .txt files with this special layout. You might read up on how they are used and I suspect there are code samples on the Internet to help you out.

    Comment

    Working...