views:

303

answers:

2

Hello,

I want to create & fill a .xls file using ADO.NET or LINQ, but I do not want to have the columns names in the first row. I just want to insert rows starting in row no. 1.

I know I have to insert colums first, but... is there a way to 'hide' those columns headers?

The problem is that, in first row of my spreadsheet, I must have only two values (one in A1 and the other in B1), but in the remaining rows I'll be inserting more than just two values (maximum 15 columns).

I'm open to suggestions/hacks/tricks even if that's not the best way of doing this.

Thanks!

+1  A: 

I think it is not the best way, but you can use Microsoft.Office.Interop.Excel

Propery you need is XlYesNoGuess

Stremlenye
That should work, but I'm trying to find a way of doing this without opening 'Excel.exe' process.If I use Interop.Excel, users who execute my application are forced to have Microsoft Excel installed.Anyway, thanks for your answer ;)
tsocks
I heard about Excel XML object model. Maybe its a decision...
Stremlenye
A: 

Hey you can use SpreadSheetGear or Aspose dll , which give you more functionality to create Excel work books using C# in .NET.

Avinash