954,551 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Excel Interop

My vb 2008 app uses Excel, but only briefly. Can I avoid referencing the Interop library Microsoft.Office.Interop,Excel?? Is there another way to link to Excel?

In terms of its dealings with Excel, my app does little more than open a workbook and shade some cells.

Many thanks

JohnDove
Newbie Poster
14 posts since Sep 2009
Reputation Points: 10
Solved Threads: 0
 

>Can I avoid referencing the Interop library Microsoft.Office.Interop,Excel?? Is there another way to link to Excel?

ADO.NET and OpenXML .

__avd
Posting Genius (adatapost)
Moderator
8,648 posts since Oct 2008
Reputation Points: 2,136
Solved Threads: 1,241
 

Using database functionality you can read and write to an excel file without having to automate Excel as long as what you are writing following a consistent table structure. I definitely prefer this method it is very easy and doesnt require the user to even have Excel. However you do lose formatting options such as bolding cells. (ive been trying to find a way for the last month and havent been able to do so.)

TomW
Posting Whiz
343 posts since Sep 2009
Reputation Points: 84
Solved Threads: 48
 

You can use OLEDB for read and write to Excel File

http://vb.net-informations.com/excel-2007/vb.net_excel_oledb.htm

Gever

gever
Newbie Poster
9 posts since Jun 2008
Reputation Points: 10
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: