Results 1 to 3 of 3

Thread: Is it possible to have Excel formatting and formulas in CSV

  1. #1
    Join Date
    Jan 2012
    Posts
    54

    Is it possible to have Excel formatting and formulas in CSV

    Is it possible to include any Excel formula or formatting information in a CSV file. I have numerous applications (typically written in SQL) that generate files that I then use within Excel. To keep things simple, I've always just generated the files as text files, in CSV format, so that they can be easily imported into Excel. However, I have two requirements that I would like to accomplish, and didn't know if either were possible. The first is that I'd like to include some basic formatting of the cells, when they are imported. I know I can do that manually, when I import the file, but I was hoping to be able to do some very minimal things (e.g., bolding text) by including some kind of
    information within the CSV file itself. Thus, when the CSV file was imported into Excel, those formatting features would already be in place. The second requirement would be to find out if there is a way to include any simple formulas in a CSV file. That might be, for example, to generate a Sum in a particular cell, or perhaps even a percentage, or some other calculation based on other information in the file. Is there any way at all to "embed" formulas within a CSV file, such that they will be evaluated when the CSV file is imported into Excel? Or is that purely something that requires generating a complete XLS file.

    BTW, if a CSV file is incapable of doing what I need, but anyone knows of ANOTHER way to accomplish this, I'd be happy to know. Again, the fundamental issue would be if there is any way to generate a file from an external program (such as VB, SQL, or other application) which could be imported into Excel, and already include formulas, or basic cell formatting.

  2. #2
    Join Date
    Aug 2011
    Posts
    460

    Re: Is it possible to have Excel formatting and formulas in CSV

    CSV files are plain text--they don't sort formatting. If you store your formulas as text (and you're careful with your addressing), excel will see them as formulas (if they start with an equal sign). But I wouldn't do either of those. I would store my data as .txt. Then create a macro that opens that text file, applies the formatting, inserts the formulas, and does other stuff (page setup, filters, sorts, pivottables, etc). Then use that macro whenever I wanted to bring in that .txt file.

  3. #3
    Join Date
    Aug 2011
    Posts
    564

    Re: Is it possible to have Excel formatting and formulas in CSV

    In my views this is not possible to some extent. It is not really easy to save all the formatting and formula in csv unless you have any proper vba code which can execute the same function that you are looking for. There is also no add-on for this process. Because once you save the file the structure is modified and mostly data is preserved.

Similar Threads

  1. Formatting MS Excel 2010 vs. Formatting MS Excel 2003
    By Dalajit in forum Windows Software
    Replies: 6
    Last Post: 12-08-2011, 10:19 PM
  2. How formulas are calculated in Excel?
    By The Recruiter in forum Windows Software
    Replies: 5
    Last Post: 26-03-2010, 03:39 AM
  3. Important formulas used in Excel
    By JustNew in forum Windows Software
    Replies: 5
    Last Post: 24-01-2010, 12:41 AM
  4. How can i display Formulas in Excel column
    By Visala28 in forum Windows Software
    Replies: 3
    Last Post: 03-09-2009, 07:46 PM
  5. How can i hide formulas in MS Excel
    By Orton in forum Windows Software
    Replies: 3
    Last Post: 04-07-2009, 08:45 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,946,189.59068 seconds with 17 queries