none
Is Formatting Excel possible using Oledb connection ? RRS feed

  • Question

  • Hello Friends, Am using Oledb connection to write data to excel, i need to format excel like cell color, font style, etc., How can i do this using Oledb connection? is it possible ?
    Tuesday, February 19, 2013 1:24 PM

Answers

  • I'm not an expert on OleDB, but my understanding is that it provides a way to read and write data in Excel files but not formatting.  You can use COM interop to update data and formatting of an Excel file, but I find it easier to use EPPlus, a free third part library that supports reading and writing of data and formatting in .xlsx (but not .xls) files.
    • Marked as answer by VRKarthikeyan Wednesday, February 20, 2013 7:27 AM
    Tuesday, February 19, 2013 1:51 PM

All replies

  • I'm not an expert on OleDB, but my understanding is that it provides a way to read and write data in Excel files but not formatting.  You can use COM interop to update data and formatting of an Excel file, but I find it easier to use EPPlus, a free third part library that supports reading and writing of data and formatting in .xlsx (but not .xls) files.
    • Marked as answer by VRKarthikeyan Wednesday, February 20, 2013 7:27 AM
    Tuesday, February 19, 2013 1:51 PM
  • Thanks Mr.Blackwood. Your answer is helpful for me
    Wednesday, February 20, 2013 7:27 AM