Показаны сообщения с ярлыком Excel. Показать все сообщения
Показаны сообщения с ярлыком Excel. Показать все сообщения

вторник, 10 января 2017 г.

Парсинг Excel на C# ссылки за 2016


Подборка ссылок про парсинг Excel

read write excel file on server
http://stackoverflow.com/questions/3781824/read-write-excel-file-on-server

Read uploaded excel file by c# with web hosting, no excel installed.
http://www.experts-exchange.com/Programming/Languages/C_Sharp/Q_27785681.html

тут рекомендуют библиотеку, но она платная
http://www.aspose.com/.net/excel-component.aspx


Reading Excel files from C#
http://stackoverflow.com/questions/15828/reading-excel-files-from-c-sharp

How to read an Excel file using C# (interop)
http://csharp.net-informations.com/excel/csharp-read-excel.htm


C# How To Read .xlsx Excel File With 3 Lines of Code
Read rows and cells from an xlsx-file: quick, dirty, effective
http://www.codeproject.com/Tips/801032/Csharp-How-To-Read-xlsx-Excel-File-With-Lines-of


Excel загрузка и выгрузка данных, используя OpenXML
http://habrahabr.ru/post/203522/

http://wladm.narod.ru/C_Sharp/comexcel.html#7

http://www.ishodniki.ru/art/art_progr/net/474.html

http://petrachuk.ru/excel-by-csharp/

пятница, 1 января 2016 г.

C# parsing Excel-file without installed Excel

Problem:
Parse Excel-file using C#.

Solution must be used in web application on server, so, it must work without installed Excel.

What Helps?

I use Excel Data Reader library

Main idea: with this library you can import excel file into ADO.NET dataset, then you canwork in .NET dataset terms with rows or cols.

Source code

FileStream stream = File.Open(filePath, FileMode.Open, FileAccess.Read);

//1. Reading from a binary Excel file ('97-2003 format; *.xls)
IExcelDataReader excelReader = ExcelReaderFactory.CreateBinaryReader(stream);
//...
//2. Reading from a OpenXml Excel file (2007 format; *.xlsx)
IExcelDataReader excelReader = ExcelReaderFactory.CreateOpenXmlReader(stream);
//...
//3. DataSet - The result of each spreadsheet will be created in the result.Tables
DataSet result = excelReader.AsDataSet();


Download link

https://exceldatareader.codeplex.com/

See also


ExcelDataReader
http://exceldatareader.codeplex.com/


Work with Excel on C# without installed Microsoft Office
http://it-student.com.ua/c/tips/rabota-s-excel-v-c-bez-ustanovlennogo-microsoft-office.html

NPOI Lib
http://www.leniel.net/2014/01/npoi-2.0-major-features-enhancements-series-of-posts-scheduled.html#sthash.mzVboJsi.dpbs

NPOI - download link and examples
http://npoi.codeplex.com/releases

NPOI examples
http://stackoverflow.com/questions/5855813/npoi-how-to-read-file-using-npoi



Work with Excel through Com Server
http://wladm.narod.ru/C_Sharp/comexcel.html#7

Excel object model from the .NET developer point of view
http://www.ishodniki.ru/art/art_progr/net/474.html


Excel with C#
http://petrachuk.ru/excel-by-csharp/

C# How To Read .xlsx Excel File With 3 Lines of Code
http://www.codeproject.com/Tips/801032/Csharp-How-To-Read-xlsx-Excel-File-With-Lines-of

Excel reading or writing using OpenXML
http://habrahabr.ru/post/203522/

Koogra Excel BIFF/XLSX Reader Library
http://sourceforge.net/projects/koogra/

пятница, 6 февраля 2015 г.

C# разбор(чтение) Excel-файла без установленного Excel

Задача:
Разобрать(прочитать) Excel-файл на C#.

Решение должно использоваться в веб-приложении на сервере, соответственно, должно работать без установленного Excel.

Что помогло

Помогла библиотека Excel Data Reader

Суть: с помощью библиотеки можно сделать импорт экселя в дотнетовский датасет (DataSet),
а дальше уже работать в терминах .NET со строками/столбцами датасета.

Код получается примерно такой

FileStream stream = File.Open(filePath, FileMode.Open, FileAccess.Read);

//1. Reading from a binary Excel file ('97-2003 format; *.xls)
IExcelDataReader excelReader = ExcelReaderFactory.CreateBinaryReader(stream);
//...
//2. Reading from a OpenXml Excel file (2007 format; *.xlsx)
IExcelDataReader excelReader = ExcelReaderFactory.CreateOpenXmlReader(stream);
//...
//3. DataSet - The result of each spreadsheet will be created in the result.Tables
DataSet result = excelReader.AsDataSet();


Где взять

https://exceldatareader.codeplex.com/

Материалы по теме


ExcelDataReader
http://exceldatareader.codeplex.com/


Работа с Excel в C# без установленного Microsoft Office
http://it-student.com.ua/c/tips/rabota-s-excel-v-c-bez-ustanovlennogo-microsoft-office.html

NPOI Lib
http://www.leniel.net/2014/01/npoi-2.0-major-features-enhancements-series-of-posts-scheduled.html#sthash.mzVboJsi.dpbs

NPOI - ссылка для скачивания и примеры
http://npoi.codeplex.com/releases

NPOI Примеры
http://stackoverflow.com/questions/5855813/npoi-how-to-read-file-using-npoi



​Работа с COM сервером Excel
http://wladm.narod.ru/C_Sharp/comexcel.html#7

Объектная модель Excel с точки зрения разработчика под .NET
http://www.ishodniki.ru/art/art_progr/net/474.html


Excel средствами C#
http://petrachuk.ru/excel-by-csharp/

C# How To Read .xlsx Excel File With 3 Lines of Code
http://www.codeproject.com/Tips/801032/Csharp-How-To-Read-xlsx-Excel-File-With-Lines-of

Excel загрузка и выгрузка данных, используя OpenXML
http://habrahabr.ru/post/203522/

Koogra Excel BIFF/XLSX Reader Library
http://sourceforge.net/projects/koogra/