0

I was once able to print an Excel equation directly to a .CSV file (which opens in Excel), which Excel would do what it would usually do when there's an equation in one of its column

Ex: (fprintf(fp,"\"=COUNTIF(R%d:AG%d,\"\">0\"\")*1.25\",",x,x);

I often print my metrics as comma separated values, since I don't know how to write directly to a new Excel file. And if there is an equation, say like the one above, Excel will compute the equation and print the values correctly.

I was wondering if there is equations similar to plot between values in two columns, so that when I open the Excel file, the plot opens too?

Has anybody done anything like this? I wish I had some Excel libraries or DLL's or something and use some Excel API's which allows me to format columns, plot graphs, etc. etc. Is something like that available out there? [Did some google-fu, didn't find anything useful. I know there's a Excel Perl module available to format outputs, save as Excel file etc.]

Thanks for help.

  • [this](http://stackoverflow.com/questions/493111/what-is-a-simple-and-reliable-c-library-for-working-with-excel-files) –  Aug 01 '13 at 18:43
  • Check out http://epplus.codeplex.com/ – John Bustos Aug 01 '13 at 21:07
  • Maybe your use case prevent this. But I would prefer to mantain all the row data in CSV, then open the data in a custom Excel file where the formulas point to the sheet with the loaded CSV. Using dynamic named ranges you could dinamically adjust the ranges. You could use a simple VBA routine to load the CSV. Users need only to push a button and choose the CSV. – momobo Aug 02 '13 at 07:47

0 Answers0