• C++ Programming for Financial Engineering
    Highly recommended by thousands of MFE students. Covers essential C++ topics with applications to financial engineering. Learn more Join!
    Python for Finance with Intro to Data Science
    Gain practical understanding of Python to read, understand, and write professional Python code for your first day on the job. Learn more Join!
    An Intuition-Based Options Primer for FE
    Ideal for entry level positions interviews and graduate studies, specializing in options trading arbitrage and options valuation models. Learn more Join!

Using C# in Excel

Again it is your imagination. I wrote XLL myself. What I view as inferior is a solution that has thousands of lines without obvious functional benefits (and may even lose some free features).

For me, even if the only extra functional benefits the 'supposed' thousands of lines of code brought to the table were the ability to provide documentation in the function wizard, they'd be worth their weight in gold. ..... oh lets not mention deployment and RegAsm ;-)

This applies to whatever technology.
Including ExcelDNA ?
 
zhouxing said:
This applies to whatever technology

Including ExcelDNA ?

To evaluate whatever solution (xlw, ExcelDNA etc), the first question I will ask is whether it offers user new and useful functional features / convenience? If it does, my next question is what's the cost for these new features? Any comprise? Any cheaper alternative? ....

So a short answer to your question is yes.
 
Hi,

Excellent discussion!
For easy and fast Excel manipulation I recommend you take a look at this Excel .NET library. It is much more faster than Excel Interop, because it has its own parsing engine. This makes it ideal for Excel ASP.NET applications.
Here is a sample Excel C# code how easy it is to export DataSet to Excel:
C++:
// Create new ExcelFile.
var ef = new ExcelFile();

// Imports all the tables from DataSet to new file.
foreach (DataTable dataTable in dataSet.Tables)
{
    // Add new worksheet to the file.
    var ws = ef.Worksheets.Add(dataTable.TableName);

    // Insert the data from DataTable to the worksheet starting at cell "A1".
    ws.InsertDataTable(dataTable, "A1", true);
}

// Save the file to XLS format.
ef.SaveXls("DataSet.xls");
 
For Excel ASP.NET applications,here is a sample Excel C# code how easy it is to export DataSet to Excel:
C++:
WorkBook m_book = new WorkBook();
 
 
 
            //Export DataTable.
 
            m_book.ImportDataTable((DataTable)this.dataGridView.DataSource, true, 0, 0, -1, -1);
 
 
 
            //Saving the workbook to disk.
 
            m_book.write("dataset.xls");
 
Back
Top