Deleting Controls (Checkboxes, Hidden, etc.) in Excel 2007

If you ever happened to copy web contents, such as tables or forms, into Excel (2007), you know it’s not straight-forward to delete the form controls, such as checkboxes, hidden fields, or edit controls.

The function to delete these controls is located in the Developer tab which may not be visible in the default installation.

To display the Developer tab, click on the Office Button (“Jewel”), select Excel Options, Popular, and check the “Show Developer tab in Ribbon” check box.

Once the Developer tab is visible and selected, enable “Design Mode”.

If you move the mouse over a checkbox or any other control in this mode, the cursor changes to a cross of 4 arrows, which allows you to select by clicking and then hitting the Delete key to delete.


Export VCF to Excel in C#

I recently needed to rescue contact data stored in a .vcf file (vCard) and export it into Excel.

As I did not want to spend much time on this work, I searched and found this C# solution on Code Project which reads VCF 2.1 files.

After a couple of modifications, the program was able to parse VCF 3.0 files, display the contents of the file in a multi-line text control, and copy the contents to the clipboard.

In Excel, the clipboard data can be pasted and the result saved as .xls or .xlsx file.

While the solution now works for my purposes (i.e. reading a VCF file and extracting contacts, phone numbers and address, email addresses, and websites), the code does not parse the full contents of a VCF file, and does not write a VCF file.

The original author was aware of some shortcomings of his solution, and so am I.

If I wrote a parser/writer from scratch, my solution would retrieve the data into dictionaries (1 per contact), and implement accessor properties to retrieve and store the requested data.

Nevertheless, if you want a simply data retrieval tool to copy existing data into an Excel sheet, the solution is good enough.

As it is derived work, the source code (C#, Visual Studio 2008) is licensed under the Code Project Open License, and can be downloaded here.