Tag Archives: Excel

Book Errata Page: The C# Helper Top 100

This is the errata page for my book The C# Helper Top 100, The 100 most popular posts at csharphelper.com. If you find mistakes, please post them here in the Leave a Reply box at the bottom of the page. … Continue reading

Posted in .NET, algorithms, books, C#, C# programming | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | 2 Comments

Book Discussion Page: The C# Helper Top 100

This is a discussion page for my book The C# Helper Top 100, The 100 most popular posts at csharphelper.com. Please post questions, thoughts, and suggestions here in the “Leave a Reply” box at the bottom of the page. I … Continue reading

Posted in .NET, algorithms, books, C#, C# programming | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | 2 Comments

Table of Contents: The C# Helper Top 100

This is a brief summary of the book’s table of contents. Introduction Part I. Serialization 1. Read a CSV File into an Array (1) 2. Use JSON to Serialize and Deserialize Objects (49) Part II. Graphing 3. Draw a Graph … Continue reading

Posted in .NET, algorithms, books, C#, C# programming | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | 2 Comments

New Book: The C# Helper Top 100

I’m happy to announce my latest book, The C# Helper Top 100, The 100 most popular posts at csharphelper.com. It describes the 100 most popular posts on the C# Helper web site. This is my 32nd book and my second … Continue reading

Posted in .NET, algorithms, books, C#, C# programming | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | Leave a comment

Load a CSV file in Excel in C#

Loading a CSV file (comma-separated value file) into Excel isn’t too hard once you know the tricks. Using the same tricks you can load a file that uses any delimiter, not just a comma. First at design time, add a … Continue reading

Posted in Excel, files, Office | Tagged , , , , , , , , , , , , | 5 Comments

Make an Excel chart in C#

This example uses the following code to create an Excel chart in a new workbook. private void btnCreateChart_Click( object sender, EventArgs e) { // Get the Excel application object. Excel.Application excel_app = new Excel.ApplicationClass(); // Make Excel visible (optional). excel_app.Visible … Continue reading

Posted in Excel, interoperability, Office | Tagged , , , , , , , , , , | Leave a comment

Add and remove pictures in an Excel worksheet

This is another brief foray into VBA programming. When you click the Insert Image button, the following VBA code executes. ‘ Insert a picture at the selection. Sub Button1_Click() Dim filters As String Dim filename As Variant ‘ Define the … Continue reading

Posted in Excel, Office, VBA | Tagged , , , , , , , , , | Leave a comment

Read Excel data in C#

To read Excel data, you can open the Excel application and use it as a server to manipulate Excel workbooks. First open the Add References dialog. On the COM tab, select “Microsoft Excel 14.0 Object Library” (or whatever version you … Continue reading

Posted in Excel, Office | Tagged , , , , , , , , , | 3 Comments

Write Excel data in C#

This example shows how to write Excel data into a workbook. You can do that by opening the Excel application and use it as a server to manipulate Excel workbooks. First open the Add References dialog. On the COM tab, … Continue reading

Posted in Excel, Office | Tagged , , , , , , , , , | 2 Comments

Use VBA code to pick random cells from the currently selected cells in an Excel workbook

This example shows how you can use VBA code to pick random cells in an Excel workbook. Sooner or later, many programmers need to write code to control another application such as the Microsoft Office applications, either for their own … Continue reading

Posted in Excel, VBA | Tagged , , , , , , , , , , | Leave a comment