Can I make filter in created excel?
This is the standard connection string e.g. I create file Excel and save to disk
ConnectionString= "
|Provider=Microsoft.ACE.OLEDB.12.0;
|Data Source="+NameExcel+";
|Extended Properties=""Excel 12.0;HDR=Yes;IMEX=0;""";
Connection = new COMObject("ADODB.Connection");
Connection.Open(ConnectionString);
Command = new COMObject("ADODB.Command");
Command.ActiveConnection = Connection;
Command.CommandType = 1;
TablName= "Mane1";
Command.CommandText = "CREATE TABLE ["+NameTabl+"] ([Vagon] int, [Date op] date,
[Operation] char(255), [Date NSP] date)";
Command.Execute();
but I'd like to set filter on head My table I have used "Excel.Application" I can do it used it:
Region = Excel.ActiveSheet.Range(Excel.ActiveSheet.Cells(1,1),Excel.ActiveSheet.Cells(1,CountColumn);
But I'm reaquared to use Microsoft.ACE.OLEDB.12.0 without "Excel.Application"