To read/write from excel spreadsheet using C#

后端 未结 5 1514
礼貌的吻别
礼貌的吻别 2021-01-14 05:47

I need to make a program that writes some data to an excel spreadsheet. Something basic along the lines of First name, last name, phone number, e-mail per row with each cate

5条回答
  •  迷失自我
    2021-01-14 06:38

    Depending on the level of sophistication needed:

    • Write a comma-separated values (CSV) text file. Excel will open it, however you wont get any formatting.
    • Write an HTML table to file and name the file as filename.xls.
    • Write out an XML file in a format that Excel can open.
    • Call Excel directly and get it to build the spreadsheet. (See cherhan's answer)

提交回复
热议问题