• 0

[C#] Excel create and write


Question

First off, the problem.

I want to create xls files, no not csv files, from my c# application. .NET Framework 2.0, and I have Office 2007 installed on my computer with all the required .NET components.

I know theres two ways to do it, the oledb way and the Office way... I need to format the columns as I create the files to autofit the contents (column width), so I think I need to do it the Office way?

------

(i originally had a question here regarding including and referencing it... for anyone interested, one must include both the Office COM pertaining to their installed version of office, as well as the interface (i think its 5.0).)

this solved my compilation problems and gave me intellisense

------

New Question:

if I run my application on a machine with an older version of excel, will it still run correctly?

Edited by zackiv31
Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

gridviews can be exported as xsl. try this.. http://forums.asp.net/p/956392/1177421.aspx

First off, the problem.

I want to create xls files, no not csv files, from my c# application. .NET Framework 2.0, and I have Office 2007 installed on my computer with all the required .NET components.

I know theres two ways to do it, the oledb way and the Office way... I need to format the columns as I create the files to autofit the contents (column width), so I think I need to do it the Office way?

------

(i originally had a question here regarding including and referencing it... for anyone interested, one must include both the Office COM pertaining to their installed version of office, as well as the interface (i think its 5.0).)

this solved my compilation problems and gave me intellisense

------

New Question:

if I run my application on a machine with an older version of excel, will it still run correctly?

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.