none
convert excel to dbf

    Question

  • hi every body I want to create a dbf file from excel in c#.net.
    I mean I fill datagridview  with information and now with click on a button I want
    to create a dbf file from that.I don't know what should I do?
    please help me.....
    • Moved by Chao Kuo Tuesday, January 26, 2010 9:40 AM (From:Visual C# General)
    Sunday, January 24, 2010 7:13 AM

Answers

  • 1. Create an empty DBF file as a template (structure only) and hold it in your project.
    2. When the user request export to floppy, copy that template to floppy and then...
    3. Connect to that template which is in floppy via ODBC or OleDb and do your work on it by SQL Statements.

    Let me know if it's not clear.
    Thanks.

    "Sweet are the uses of adversity,
     Which like the toad, ugly and venomous,
     Wears yet a precious jewel in his head;
     And this our life, exempt from public haunt,
     Finds tongues in trees,
     Books in the running brooks,
     Sermons in stones, and good in everything" - William Shakespeare

    • Marked as answer by Martin_Xie Friday, January 29, 2010 9:07 AM
    Sunday, January 24, 2010 8:02 AM

All replies

  • Create an ODBC connection to the DBF file and insert rows by SQL Statements.

    "Sweet are the uses of adversity,
     Which like the toad, ugly and venomous,
     Wears yet a precious jewel in his head;
     And this our life, exempt from public haunt,
     Finds tongues in trees,
     Books in the running brooks,
     Sermons in stones, and good in everything" - William Shakespeare

    Sunday, January 24, 2010 7:46 AM
  • 1. Create an empty DBF file as a template (structure only) and hold it in your project.
    2. When the user request export to floppy, copy that template to floppy and then...
    3. Connect to that template which is in floppy via ODBC or OleDb and do your work on it by SQL Statements.

    Let me know if it's not clear.
    Thanks.

    "Sweet are the uses of adversity,
     Which like the toad, ugly and venomous,
     Wears yet a precious jewel in his head;
     And this our life, exempt from public haunt,
     Finds tongues in trees,
     Books in the running brooks,
     Sermons in stones, and good in everything" - William Shakespeare

    • Marked as answer by Martin_Xie Friday, January 29, 2010 9:07 AM
    Sunday, January 24, 2010 8:02 AM