SlideShare a Scribd company logo
1




Excel 元件 -EPPlus!
Presented by
Joncash
6/1/2012
2




Outline
•   Introduction EPPlus
•   Other Library
•   Limit & License
•   How to use
•   Snippet Code
•   References
3




Introduction EPPLus
• EPPlus is a .net library that reads and writes
  Excel 2007/2010 files using the Open Office Xml
  format (xlsx).
• EPPlus 提供簡單、便捷的 API 介面
 ▫ 用 .Cells[rowIndex, colIndex] 就能直接存取欄位
 ▫ 用 .Cells[r1:c1] 就能取得一段選取範圍
 ▫ 用 Cells[…].Style.Font.Color.SetColor(Color.Red)
   改變字型
 ▫ Many more
4




Other Library
• NPOI Library
 ▫ 源自於 Apache POI 專案
• Open XML SDK
 ▫ 微軟提供的函式庫
• OpenOffice.org SDK
 ▫ OpenOffice
• LinqToExcel
 ▫ 只限於讀取
5




Limit & License
• Only Support Excel 2007/2010
• LGPL ( GNU Lesser General Public
  License )
 ▫ 純引用 Library 不用 open source.
 ▫ 有修改 Library, 修改的部份要及產品中使用到的
   Source Code 要 Open Source
6




How to use
• Download
 ▫ http://epplus.codeplex.com/
 ▫ NuGet
• Reference EPPlus.dll in your project
7




Snippet Code
//Create Excel
FileInfo newFile = new FileInfo(outputDir.FullName +
  @"sample6.xlsx");
ExcelPackage pck = new ExcelPackage(newFile);

//Add the Content sheet
var ws = pck.Workbook.Worksheets.Add("Content");

//set style
ws.Cells["B1:E1"].Style.Font.Bold = true;

//set value
ws.Cells["B1"].Value = "Name";
8




EPPlus and Linq
var sheet1 = pck.Workbook.Worksheets["Sheet1"];
var query = (from cell in sheet1.Cells["a:a"]
where cell.Value != ""
select cell);
query3.SingleOrDefault().Value.Dump();




                     Version 2.8 has added support for
                     enumeration of cells....
9




NPOI V.S EPPlus
NPOI                                        EPPLUs
// 建立 worksheet                             var pck = new ExcelPackage(new
var workBook = new HSSFWorkbook();          FileInfo(@"D:EPPLus.xlsx"));

// 建立 sheet                                 // 建立 sheet
var sheet1 =                                var sheet1 =
workBook.CreateSheet("Sheet1");
                                            pck.Workbook.Worksheets.Add("Sheet1")
                                            ;
// 設值
sheet1.CreateRow(1).CreateCell(1).SetCell
Value("XXX");                               // 設值
                                            sheet1.Cells[1, 1].Value = "XXX";
// 存檔
FileStream file = new                       // 存檔
FileStream(@"C:NPOI.xls",                  pck.Save();
FileMode.Create);
hssfworkbook.Write(file);
file.Close();
10




References
• 比NPOI更討喜的Excel元件-EPPlus!
• EPPlus-Create advanced Excel 2007 spreadsheets on
• [C#] NPOI、OpenXML SDK、
  OpenOffice.org SDK 寫入資料到 EXCEL 檔案
• 在 Server 端存取 Excel 檔案的利器:
  NPOI Library
• Creating Reports in Excel 2007 using EPPlus (

More Related Content

What's hot

Ingesting and Manipulating Data with JavaScript
Ingesting and Manipulating Data with JavaScriptIngesting and Manipulating Data with JavaScript
Ingesting and Manipulating Data with JavaScript
Lucidworks
 
SQLite
SQLiteSQLite
SQLite
Kirill Zotin
 
Apache avro and overview hadoop tools
Apache avro and overview hadoop toolsApache avro and overview hadoop tools
Apache avro and overview hadoop tools
alireza alikhani
 
Elasticsearch 101 - Cluster setup and tuning
Elasticsearch 101 - Cluster setup and tuningElasticsearch 101 - Cluster setup and tuning
Elasticsearch 101 - Cluster setup and tuning
Petar Djekic
 
Catmandu Librecat
Catmandu LibrecatCatmandu Librecat
Catmandu Librecat
Patrick Hochstenbach
 
Hands On Spring Data
Hands On Spring DataHands On Spring Data
Hands On Spring Data
Eric Bottard
 
laravel-53
laravel-53laravel-53
laravel-53
ahmed nabih
 
Building a Search Engine Using Lucene
Building a Search Engine Using LuceneBuilding a Search Engine Using Lucene
Building a Search Engine Using Lucene
Abdelrahman Othman Helal
 
Faster Data Analytics with Apache Spark using Apache Solr - Kiran Chitturi, L...
Faster Data Analytics with Apache Spark using Apache Solr - Kiran Chitturi, L...Faster Data Analytics with Apache Spark using Apache Solr - Kiran Chitturi, L...
Faster Data Analytics with Apache Spark using Apache Solr - Kiran Chitturi, L...
Lucidworks
 
Introduction to Elasticsearch
Introduction to ElasticsearchIntroduction to Elasticsearch
Introduction to Elasticsearch
Sperasoft
 
ElasticES-Hadoop: Bridging the world of Hadoop and Elasticsearch
ElasticES-Hadoop: Bridging the world of Hadoop and ElasticsearchElasticES-Hadoop: Bridging the world of Hadoop and Elasticsearch
ElasticES-Hadoop: Bridging the world of Hadoop and Elasticsearch
MapR Technologies
 
From Lucene to Elasticsearch, a short explanation of horizontal scalability
From Lucene to Elasticsearch, a short explanation of horizontal scalabilityFrom Lucene to Elasticsearch, a short explanation of horizontal scalability
From Lucene to Elasticsearch, a short explanation of horizontal scalability
Stéphane Gamard
 

What's hot (12)

Ingesting and Manipulating Data with JavaScript
Ingesting and Manipulating Data with JavaScriptIngesting and Manipulating Data with JavaScript
Ingesting and Manipulating Data with JavaScript
 
SQLite
SQLiteSQLite
SQLite
 
Apache avro and overview hadoop tools
Apache avro and overview hadoop toolsApache avro and overview hadoop tools
Apache avro and overview hadoop tools
 
Elasticsearch 101 - Cluster setup and tuning
Elasticsearch 101 - Cluster setup and tuningElasticsearch 101 - Cluster setup and tuning
Elasticsearch 101 - Cluster setup and tuning
 
Catmandu Librecat
Catmandu LibrecatCatmandu Librecat
Catmandu Librecat
 
Hands On Spring Data
Hands On Spring DataHands On Spring Data
Hands On Spring Data
 
laravel-53
laravel-53laravel-53
laravel-53
 
Building a Search Engine Using Lucene
Building a Search Engine Using LuceneBuilding a Search Engine Using Lucene
Building a Search Engine Using Lucene
 
Faster Data Analytics with Apache Spark using Apache Solr - Kiran Chitturi, L...
Faster Data Analytics with Apache Spark using Apache Solr - Kiran Chitturi, L...Faster Data Analytics with Apache Spark using Apache Solr - Kiran Chitturi, L...
Faster Data Analytics with Apache Spark using Apache Solr - Kiran Chitturi, L...
 
Introduction to Elasticsearch
Introduction to ElasticsearchIntroduction to Elasticsearch
Introduction to Elasticsearch
 
ElasticES-Hadoop: Bridging the world of Hadoop and Elasticsearch
ElasticES-Hadoop: Bridging the world of Hadoop and ElasticsearchElasticES-Hadoop: Bridging the world of Hadoop and Elasticsearch
ElasticES-Hadoop: Bridging the world of Hadoop and Elasticsearch
 
From Lucene to Elasticsearch, a short explanation of horizontal scalability
From Lucene to Elasticsearch, a short explanation of horizontal scalabilityFrom Lucene to Elasticsearch, a short explanation of horizontal scalability
From Lucene to Elasticsearch, a short explanation of horizontal scalability
 

Viewers also liked

Ukraine export restrictions 652
Ukraine export restrictions 652Ukraine export restrictions 652
Ukraine export restrictions 652app_don
 
Borrador trabajo final_de_disenos
Borrador trabajo final_de_disenosBorrador trabajo final_de_disenos
Borrador trabajo final_de_disenos
soradriana
 
Ukraine export restrictions 658
Ukraine export restrictions 658Ukraine export restrictions 658
Ukraine export restrictions 658app_don
 
React.js 20150828
React.js 20150828React.js 20150828
React.js 20150828
LearningTech
 
Cabalgata 2 O1 O
Cabalgata 2 O1 OCabalgata 2 O1 O
Cabalgata 2 O1 O
Guadavillaverde
 
Chistes
ChistesChistes
Ukraine export restrictions 653
Ukraine export restrictions 653Ukraine export restrictions 653
Ukraine export restrictions 653app_don
 
Desarrollo del i examen parcial de instalaciones en edificaciones i
Desarrollo del i examen parcial de instalaciones en edificaciones iDesarrollo del i examen parcial de instalaciones en edificaciones i
Desarrollo del i examen parcial de instalaciones en edificaciones i
dennith
 
Ukraine export restrictions 655
Ukraine export restrictions 655Ukraine export restrictions 655
Ukraine export restrictions 655app_don
 
Neuville mai 2012
Neuville mai 2012Neuville mai 2012
Neuville mai 2012neuville95
 
Histologia tecido conjuntivo especial, muscular e nervoso
Histologia tecido conjuntivo especial, muscular e nervosoHistologia tecido conjuntivo especial, muscular e nervoso
Histologia tecido conjuntivo especial, muscular e nervoso
robervalmoraes
 
Aula de Embriologia (UNESP - CLP)
Aula de Embriologia (UNESP - CLP)Aula de Embriologia (UNESP - CLP)
Aula de Embriologia (UNESP - CLP)
Gilmar Giraldelli
 

Viewers also liked (14)

Ukraine export restrictions 652
Ukraine export restrictions 652Ukraine export restrictions 652
Ukraine export restrictions 652
 
Resolución 007 2015
Resolución 007 2015Resolución 007 2015
Resolución 007 2015
 
Borrador trabajo final_de_disenos
Borrador trabajo final_de_disenosBorrador trabajo final_de_disenos
Borrador trabajo final_de_disenos
 
Ukraine export restrictions 658
Ukraine export restrictions 658Ukraine export restrictions 658
Ukraine export restrictions 658
 
React.js 20150828
React.js 20150828React.js 20150828
React.js 20150828
 
objeto
objetoobjeto
objeto
 
Cabalgata 2 O1 O
Cabalgata 2 O1 OCabalgata 2 O1 O
Cabalgata 2 O1 O
 
Chistes
ChistesChistes
Chistes
 
Ukraine export restrictions 653
Ukraine export restrictions 653Ukraine export restrictions 653
Ukraine export restrictions 653
 
Desarrollo del i examen parcial de instalaciones en edificaciones i
Desarrollo del i examen parcial de instalaciones en edificaciones iDesarrollo del i examen parcial de instalaciones en edificaciones i
Desarrollo del i examen parcial de instalaciones en edificaciones i
 
Ukraine export restrictions 655
Ukraine export restrictions 655Ukraine export restrictions 655
Ukraine export restrictions 655
 
Neuville mai 2012
Neuville mai 2012Neuville mai 2012
Neuville mai 2012
 
Histologia tecido conjuntivo especial, muscular e nervoso
Histologia tecido conjuntivo especial, muscular e nervosoHistologia tecido conjuntivo especial, muscular e nervoso
Histologia tecido conjuntivo especial, muscular e nervoso
 
Aula de Embriologia (UNESP - CLP)
Aula de Embriologia (UNESP - CLP)Aula de Embriologia (UNESP - CLP)
Aula de Embriologia (UNESP - CLP)
 

Similar to 20120601_Excel 元件 ep plus joncash

Apache poi tutorial
Apache poi tutorialApache poi tutorial
Apache poi tutorial
Ramakrishna kapa
 
Apachepoitutorial
ApachepoitutorialApachepoitutorial
Apachepoitutorial
Srikrishna k
 
Python openpyxl
Python openpyxlPython openpyxl
Python openpyxl
Amarjeetsingh Thakur
 
Exploiting JXL using Selenium
Exploiting JXL using SeleniumExploiting JXL using Selenium
Exploiting JXL using Selenium
OSSCube
 
How to Read Excel Files in Java (1).pdf
How to Read Excel Files in Java (1).pdfHow to Read Excel Files in Java (1).pdf
How to Read Excel Files in Java (1).pdf
SudhanshiBakre1
 
Office OpenXML: a technical approach for OOo.
Office OpenXML: a technical approach for OOo.Office OpenXML: a technical approach for OOo.
Office OpenXML: a technical approach for OOo.
Alexandro Colorado
 
Alex Troush - IEx Cheat Sheet
Alex Troush - IEx Cheat Sheet Alex Troush - IEx Cheat Sheet
Alex Troush - IEx Cheat Sheet
Elixir Club
 
PHPExcel and OPENXML4J
PHPExcel and OPENXML4JPHPExcel and OPENXML4J
PHPExcel and OPENXML4J
Maarten Balliauw
 
mdeshell
mdeshellmdeshell
Introduction to OpenSees by Frank McKenna
Introduction to OpenSees by Frank McKennaIntroduction to OpenSees by Frank McKenna
Introduction to OpenSees by Frank McKenna
openseesdays
 
Introduction to UNIX
Introduction to UNIXIntroduction to UNIX
PYTHON FOR SPREADSHEET USERS.pptx
PYTHON FOR SPREADSHEET USERS.pptxPYTHON FOR SPREADSHEET USERS.pptx
PYTHON FOR SPREADSHEET USERS.pptx
rmlkmrPphtt
 
Enrich Your Models With OCL
Enrich Your Models With OCLEnrich Your Models With OCL
Enrich Your Models With OCL
Edward Willink
 
Let's Compare: A Benchmark review of InfluxDB and Elasticsearch
Let's Compare: A Benchmark review of InfluxDB and ElasticsearchLet's Compare: A Benchmark review of InfluxDB and Elasticsearch
Let's Compare: A Benchmark review of InfluxDB and Elasticsearch
InfluxData
 
06 file processing
06 file processing06 file processing
06 file processing
Issay Meii
 
Developer & Fusion Middleware 1 | Mark Drake | An introduction to Oracle XML ...
Developer & Fusion Middleware 1 | Mark Drake | An introduction to Oracle XML ...Developer & Fusion Middleware 1 | Mark Drake | An introduction to Oracle XML ...
Developer & Fusion Middleware 1 | Mark Drake | An introduction to Oracle XML ...
InSync2011
 
VTU 3RD SEM UNIX AND SHELL PROGRAMMING SOLVED PAPERS
VTU 3RD SEM UNIX AND SHELL PROGRAMMING SOLVED PAPERSVTU 3RD SEM UNIX AND SHELL PROGRAMMING SOLVED PAPERS
VTU 3RD SEM UNIX AND SHELL PROGRAMMING SOLVED PAPERS
vtunotesbysree
 
Excel Scripting
Excel Scripting Excel Scripting
Excel Scripting
G C Reddy Technologies
 
Apache Lucene intro - Breizhcamp 2015
Apache Lucene intro - Breizhcamp 2015Apache Lucene intro - Breizhcamp 2015
Apache Lucene intro - Breizhcamp 2015
Adrien Grand
 
Programming the Semantic Web
Programming the Semantic WebProgramming the Semantic Web
Programming the Semantic Web
Luigi De Russis
 

Similar to 20120601_Excel 元件 ep plus joncash (20)

Apache poi tutorial
Apache poi tutorialApache poi tutorial
Apache poi tutorial
 
Apachepoitutorial
ApachepoitutorialApachepoitutorial
Apachepoitutorial
 
Python openpyxl
Python openpyxlPython openpyxl
Python openpyxl
 
Exploiting JXL using Selenium
Exploiting JXL using SeleniumExploiting JXL using Selenium
Exploiting JXL using Selenium
 
How to Read Excel Files in Java (1).pdf
How to Read Excel Files in Java (1).pdfHow to Read Excel Files in Java (1).pdf
How to Read Excel Files in Java (1).pdf
 
Office OpenXML: a technical approach for OOo.
Office OpenXML: a technical approach for OOo.Office OpenXML: a technical approach for OOo.
Office OpenXML: a technical approach for OOo.
 
Alex Troush - IEx Cheat Sheet
Alex Troush - IEx Cheat Sheet Alex Troush - IEx Cheat Sheet
Alex Troush - IEx Cheat Sheet
 
PHPExcel and OPENXML4J
PHPExcel and OPENXML4JPHPExcel and OPENXML4J
PHPExcel and OPENXML4J
 
mdeshell
mdeshellmdeshell
mdeshell
 
Introduction to OpenSees by Frank McKenna
Introduction to OpenSees by Frank McKennaIntroduction to OpenSees by Frank McKenna
Introduction to OpenSees by Frank McKenna
 
Introduction to UNIX
Introduction to UNIXIntroduction to UNIX
Introduction to UNIX
 
PYTHON FOR SPREADSHEET USERS.pptx
PYTHON FOR SPREADSHEET USERS.pptxPYTHON FOR SPREADSHEET USERS.pptx
PYTHON FOR SPREADSHEET USERS.pptx
 
Enrich Your Models With OCL
Enrich Your Models With OCLEnrich Your Models With OCL
Enrich Your Models With OCL
 
Let's Compare: A Benchmark review of InfluxDB and Elasticsearch
Let's Compare: A Benchmark review of InfluxDB and ElasticsearchLet's Compare: A Benchmark review of InfluxDB and Elasticsearch
Let's Compare: A Benchmark review of InfluxDB and Elasticsearch
 
06 file processing
06 file processing06 file processing
06 file processing
 
Developer & Fusion Middleware 1 | Mark Drake | An introduction to Oracle XML ...
Developer & Fusion Middleware 1 | Mark Drake | An introduction to Oracle XML ...Developer & Fusion Middleware 1 | Mark Drake | An introduction to Oracle XML ...
Developer & Fusion Middleware 1 | Mark Drake | An introduction to Oracle XML ...
 
VTU 3RD SEM UNIX AND SHELL PROGRAMMING SOLVED PAPERS
VTU 3RD SEM UNIX AND SHELL PROGRAMMING SOLVED PAPERSVTU 3RD SEM UNIX AND SHELL PROGRAMMING SOLVED PAPERS
VTU 3RD SEM UNIX AND SHELL PROGRAMMING SOLVED PAPERS
 
Excel Scripting
Excel Scripting Excel Scripting
Excel Scripting
 
Apache Lucene intro - Breizhcamp 2015
Apache Lucene intro - Breizhcamp 2015Apache Lucene intro - Breizhcamp 2015
Apache Lucene intro - Breizhcamp 2015
 
Programming the Semantic Web
Programming the Semantic WebProgramming the Semantic Web
Programming the Semantic Web
 

More from LearningTech

vim
vimvim
PostCss
PostCssPostCss
PostCss
LearningTech
 
ReactJs
ReactJsReactJs
ReactJs
LearningTech
 
Docker
DockerDocker
Docker
LearningTech
 
Semantic ui
Semantic uiSemantic ui
Semantic ui
LearningTech
 
node.js errors
node.js errorsnode.js errors
node.js errors
LearningTech
 
Process control nodejs
Process control nodejsProcess control nodejs
Process control nodejs
LearningTech
 
Expression tree
Expression treeExpression tree
Expression tree
LearningTech
 
SQL 效能調校
SQL 效能調校SQL 效能調校
SQL 效能調校
LearningTech
 
flexbox report
flexbox reportflexbox report
flexbox report
LearningTech
 
Vic weekly learning_20160504
Vic weekly learning_20160504Vic weekly learning_20160504
Vic weekly learning_20160504
LearningTech
 
Reflection & activator
Reflection & activatorReflection & activator
Reflection & activator
LearningTech
 
Peggy markdown
Peggy markdownPeggy markdown
Peggy markdown
LearningTech
 
Node child process
Node child processNode child process
Node child process
LearningTech
 
20160415ken.lee
20160415ken.lee20160415ken.lee
20160415ken.lee
LearningTech
 
Peggy elasticsearch應用
Peggy elasticsearch應用Peggy elasticsearch應用
Peggy elasticsearch應用
LearningTech
 
Expression tree
Expression treeExpression tree
Expression tree
LearningTech
 
Vic weekly learning_20160325
Vic weekly learning_20160325Vic weekly learning_20160325
Vic weekly learning_20160325
LearningTech
 
D3js learning tips
D3js learning tipsD3js learning tips
D3js learning tips
LearningTech
 
git command
git commandgit command
git command
LearningTech
 

More from LearningTech (20)

vim
vimvim
vim
 
PostCss
PostCssPostCss
PostCss
 
ReactJs
ReactJsReactJs
ReactJs
 
Docker
DockerDocker
Docker
 
Semantic ui
Semantic uiSemantic ui
Semantic ui
 
node.js errors
node.js errorsnode.js errors
node.js errors
 
Process control nodejs
Process control nodejsProcess control nodejs
Process control nodejs
 
Expression tree
Expression treeExpression tree
Expression tree
 
SQL 效能調校
SQL 效能調校SQL 效能調校
SQL 效能調校
 
flexbox report
flexbox reportflexbox report
flexbox report
 
Vic weekly learning_20160504
Vic weekly learning_20160504Vic weekly learning_20160504
Vic weekly learning_20160504
 
Reflection & activator
Reflection & activatorReflection & activator
Reflection & activator
 
Peggy markdown
Peggy markdownPeggy markdown
Peggy markdown
 
Node child process
Node child processNode child process
Node child process
 
20160415ken.lee
20160415ken.lee20160415ken.lee
20160415ken.lee
 
Peggy elasticsearch應用
Peggy elasticsearch應用Peggy elasticsearch應用
Peggy elasticsearch應用
 
Expression tree
Expression treeExpression tree
Expression tree
 
Vic weekly learning_20160325
Vic weekly learning_20160325Vic weekly learning_20160325
Vic weekly learning_20160325
 
D3js learning tips
D3js learning tipsD3js learning tips
D3js learning tips
 
git command
git commandgit command
git command
 

Recently uploaded

Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
Hiroshi SHIBATA
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
akankshawande
 
Essentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation ParametersEssentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation Parameters
Safe Software
 
Demystifying Knowledge Management through Storytelling
Demystifying Knowledge Management through StorytellingDemystifying Knowledge Management through Storytelling
Demystifying Knowledge Management through Storytelling
Enterprise Knowledge
 
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectorsConnector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
DianaGray10
 
inQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
inQuba Webinar Mastering Customer Journey Management with Dr Graham HillinQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
inQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
LizaNolte
 
"$10 thousand per minute of downtime: architecture, queues, streaming and fin...
"$10 thousand per minute of downtime: architecture, queues, streaming and fin..."$10 thousand per minute of downtime: architecture, queues, streaming and fin...
"$10 thousand per minute of downtime: architecture, queues, streaming and fin...
Fwdays
 
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-EfficiencyFreshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
ScyllaDB
 
JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
Miro Wengner
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
Jason Packer
 
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
Fwdays
 
Mutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented ChatbotsMutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented Chatbots
Pablo Gómez Abajo
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
Chart Kalyan
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Tosin Akinosho
 
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
DanBrown980551
 
High performance Serverless Java on AWS- GoTo Amsterdam 2024
High performance Serverless Java on AWS- GoTo Amsterdam 2024High performance Serverless Java on AWS- GoTo Amsterdam 2024
High performance Serverless Java on AWS- GoTo Amsterdam 2024
Vadym Kazulkin
 
Christine's Supplier Sourcing Presentaion.pptx
Christine's Supplier Sourcing Presentaion.pptxChristine's Supplier Sourcing Presentaion.pptx
Christine's Supplier Sourcing Presentaion.pptx
christinelarrosa
 
Christine's Product Research Presentation.pptx
Christine's Product Research Presentation.pptxChristine's Product Research Presentation.pptx
Christine's Product Research Presentation.pptx
christinelarrosa
 
Y-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PPY-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PP
c5vrf27qcz
 
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
Jason Yip
 

Recently uploaded (20)

Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
 
Essentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation ParametersEssentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation Parameters
 
Demystifying Knowledge Management through Storytelling
Demystifying Knowledge Management through StorytellingDemystifying Knowledge Management through Storytelling
Demystifying Knowledge Management through Storytelling
 
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectorsConnector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
 
inQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
inQuba Webinar Mastering Customer Journey Management with Dr Graham HillinQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
inQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
 
"$10 thousand per minute of downtime: architecture, queues, streaming and fin...
"$10 thousand per minute of downtime: architecture, queues, streaming and fin..."$10 thousand per minute of downtime: architecture, queues, streaming and fin...
"$10 thousand per minute of downtime: architecture, queues, streaming and fin...
 
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-EfficiencyFreshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
 
JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
 
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
 
Mutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented ChatbotsMutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented Chatbots
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
 
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
 
High performance Serverless Java on AWS- GoTo Amsterdam 2024
High performance Serverless Java on AWS- GoTo Amsterdam 2024High performance Serverless Java on AWS- GoTo Amsterdam 2024
High performance Serverless Java on AWS- GoTo Amsterdam 2024
 
Christine's Supplier Sourcing Presentaion.pptx
Christine's Supplier Sourcing Presentaion.pptxChristine's Supplier Sourcing Presentaion.pptx
Christine's Supplier Sourcing Presentaion.pptx
 
Christine's Product Research Presentation.pptx
Christine's Product Research Presentation.pptxChristine's Product Research Presentation.pptx
Christine's Product Research Presentation.pptx
 
Y-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PPY-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PP
 
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
 

20120601_Excel 元件 ep plus joncash

  • 1. 1 Excel 元件 -EPPlus! Presented by Joncash 6/1/2012
  • 2. 2 Outline • Introduction EPPlus • Other Library • Limit & License • How to use • Snippet Code • References
  • 3. 3 Introduction EPPLus • EPPlus is a .net library that reads and writes Excel 2007/2010 files using the Open Office Xml format (xlsx). • EPPlus 提供簡單、便捷的 API 介面 ▫ 用 .Cells[rowIndex, colIndex] 就能直接存取欄位 ▫ 用 .Cells[r1:c1] 就能取得一段選取範圍 ▫ 用 Cells[…].Style.Font.Color.SetColor(Color.Red) 改變字型 ▫ Many more
  • 4. 4 Other Library • NPOI Library ▫ 源自於 Apache POI 專案 • Open XML SDK ▫ 微軟提供的函式庫 • OpenOffice.org SDK ▫ OpenOffice • LinqToExcel ▫ 只限於讀取
  • 5. 5 Limit & License • Only Support Excel 2007/2010 • LGPL ( GNU Lesser General Public License ) ▫ 純引用 Library 不用 open source. ▫ 有修改 Library, 修改的部份要及產品中使用到的 Source Code 要 Open Source
  • 6. 6 How to use • Download ▫ http://epplus.codeplex.com/ ▫ NuGet • Reference EPPlus.dll in your project
  • 7. 7 Snippet Code //Create Excel FileInfo newFile = new FileInfo(outputDir.FullName + @"sample6.xlsx"); ExcelPackage pck = new ExcelPackage(newFile); //Add the Content sheet var ws = pck.Workbook.Worksheets.Add("Content"); //set style ws.Cells["B1:E1"].Style.Font.Bold = true; //set value ws.Cells["B1"].Value = "Name";
  • 8. 8 EPPlus and Linq var sheet1 = pck.Workbook.Worksheets["Sheet1"]; var query = (from cell in sheet1.Cells["a:a"] where cell.Value != "" select cell); query3.SingleOrDefault().Value.Dump(); Version 2.8 has added support for enumeration of cells....
  • 9. 9 NPOI V.S EPPlus NPOI EPPLUs // 建立 worksheet var pck = new ExcelPackage(new var workBook = new HSSFWorkbook(); FileInfo(@"D:EPPLus.xlsx")); // 建立 sheet // 建立 sheet var sheet1 = var sheet1 = workBook.CreateSheet("Sheet1"); pck.Workbook.Worksheets.Add("Sheet1") ; // 設值 sheet1.CreateRow(1).CreateCell(1).SetCell Value("XXX"); // 設值 sheet1.Cells[1, 1].Value = "XXX"; // 存檔 FileStream file = new // 存檔 FileStream(@"C:NPOI.xls", pck.Save(); FileMode.Create); hssfworkbook.Write(file); file.Close();
  • 10. 10 References • 比NPOI更討喜的Excel元件-EPPlus! • EPPlus-Create advanced Excel 2007 spreadsheets on • [C#] NPOI、OpenXML SDK、 OpenOffice.org SDK 寫入資料到 EXCEL 檔案 • 在 Server 端存取 Excel 檔案的利器: NPOI Library • Creating Reports in Excel 2007 using EPPlus (