c# - Convert sql ce tables to .xls or .xlsx format -


i have c# windows application makes use of database in sql compact edition 3.5 data manipulation. convert each table in database excel file. realise read cell cell , export excel, however, have lot of tables (upwards of 100) , take long time. there method convert tables in sql ce database file excel spreadsheets in quicker manner.

my users wanted data in excel because wanted access raw, unmanipulated data reference purpose. also, quite comfortable excel.

is there simple technique accomplish this?

use closedxml it's open source

using system.data;  class program {     static void main(string[] args)     {         datatable table = new datatable("test");         table.columns.add();         table.columns.add();         table.rows.add("1", "2");         table.rows.add("3", "4");         closedxml.excel.xlworkbook workbook = new closedxml.excel.xlworkbook();         workbook.worksheets.add(table);         workbook.saveas("d:\\test.xlsx");     } } 

Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -