Search Results

Search found 6 results on 1 pages for 'cmptrb'.

Page 1/1 | 1 

  • excel - inserting data with OleDb c#

    - by Cmptrb
    Hi, my code is below: private string connectionstring = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\myexcel.xls; Extended Properties=""Excel 8.0;HDR=YES;"""; this is my connection string, the excel file is created writable (not readonly) either my command to insert any data is : string commandstring = "insert into [mus$] (name, surname) values('mickey', 'mouse')"; But my commandstring does not work and gives the error: "number of query values and destination fields are not the same" Where I do mistake ?

    Read the article

  • Problem saving excel file after inserting data

    - by Cmptrb
    Hi, I want to write data to an existing excel file ( I do it easily ) But I can not save the changes on the excel file ( actually I see the changes on the excel file, but it seems opened and after all it occurs some problems such as "the file is already opened with same name and so on ... ) Excel.Application app= new Microsoft.Office.Interop.Excel.Application(); Excel.Workbook appbook= app.Workbooks.Open(appxls, 0, true, 5, "", "", false, Excel.XlPlatform.xlWindows, "\t", true, false, 0, true, Missing.Value, Missing.Value); Excel.Sheets pages= appbook.Worksheets; Excel.Worksheet page= (Excel.Worksheet)pages.get_Item(1); //... i change some values on the excel file and want to save them : // appxls is a string holding the path appbook.SaveAs(appxls, Excel.XlFileFormat.xlWorkbookNormal, Type.Missing, Type.Missing,false, Type.Missing, Excel.XlSaveAsAccessMode.xlShared, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing); appbook.Close(true, Missing.Value, Missing.Value); app.Quit(); Where is the problem, how can I solve it using Microsoft.interop.

    Read the article

  • xml to excel file

    - by Cmptrb
    Hi, I have a xml document holding a small data for my project where I want to convert my xml to an excel file (microsoft office excel 2003 and over) How can I do this? Kind Regards.

    Read the article

1