Haw to read-out xls file; to write to .xls file?

Locked Haw to read-out xls file; to write to .xls file?

  • Tuesday, November 08, 2005 9:40 PM
     
     
    Hello everybody,
    I'm looking in whole internet (and in this forum to) nothing completly works.
    Ok, here is the problem.
    In the project that i'm working on,
    i have a:
    1) "DataGrid1", which's DataSource is "DataSet1", which Contains one Table - "DataTable1". They all are empty, only the columns of "DataTable1" have names (for egz: "first_col",..."second_col")
    2) Excel file on my Hdd - "c:\1.xls"

    I need the program to
    1) Load the contents of excel file to This "DataSet1" ("DataTable1"), so they could be seen on "DataGrid1"

    ...then user edits some of the contents in "DataGrid1"...

    2) And then I want the program to save the edited contents of the "DataSet1" to save to other .xls file - for egz "c:\2.xls"

    In other words - i need to open, edit and save an Excel file with my program.

    p.s. contents of 1.xls and 2.xls are plain text of course (no pics, graphs or etc), but the solution of having .cvs file isn't good for me.
    p.p.s. excuse me for my broken englinsh:)

All Replies