Welcome!
[Sign In]
!
[Sign Up]
!
Front-page it
|
Collect it
| [
中国-简体中文
]
CodeBus
codebus.net
Hot search:
Source
embeded
web
remote control
p2p
game
More...
FAQ
Fav
Home
SourceCode
Web Code
Develop Tools
Document
E-Books
Other Resource
Get Coins
Member
Location:
Search - using GemBox.ExcelLi
Category
Source Code
Web/Internet
Develop Tools
Document
Other
Search in results
OS
Windows
Linux
FreeBSD
Unix
Dos
PalmOS
WinCE
SymbianOS
MacOS
Android
Platform
Visual C
Visual.Net
Borland C
CBuilder
Dephi
gcc
VBA
LISP
IDL
VHDL
Matlab
MathCAD
Flash
Xcode
Android STU
LabVIEW
Language
C/C++
Pascal
ASM
Java
PHP
Basic/ASP
Perl
Python
VBScript
JavaScript
SQL
FoxBase
SHELL
E-Language
OC/Swift
File Type
SourceCode
Program
CHM
PDF
PPT
WORD
Excel
Access
HTML
Text
Search list
[
CSharp
]
GemBox.ExcelLite
Description:
导出Excel组件(B/S或C/S都可以用) using GemBox.ExcelLite //引用文件 ExcelFile excelFile = new ExcelFile() ExcelWorksheet sheet = excelFile.Worksheets.Add("WolfSpider") int columns = dataGridView1.Columns.Count int rows = dataGridView1.Rows.Count for (int j = 0 j < columns j++ ) { sheet.Cells[0, j].Value = dataGridView1.Columns[j].HeaderText } for (int i = 1 i <= rows i++) { for (int j = 0 j < columns j++) { sheet.Cells[i, j].Value = dataGridView1[j, i-1].Value } } excelFile.SaveXls("./guyun.xls") //这里的文件名可以任意定义 -Excel export component (B/S or C/S can be used) using GemBox.ExcelLite // reference document ExcelFile excelFile = new ExcelFile () ExcelWorksheet sheet = excelFile.Worksheets.Add ( " WolfSpider" ) int columns = dataGridView1.Columns.Count int rows = dataGridView1.Rows.Count for (int j = 0 j < columns j++) (sheet.Cells [0, j]. Value = dataGridView1.Columns [j]. HeaderText ) for (int i = 1 i < = rows i++) (for (int j = 0 j < columns j++) (sheet.Cells [i, j]. Value = dataGridView1 [j, i-1]. Value )) excelFile.SaveXls ( " ./guyun.xls" ) // here the file name can be defined
Platform:
|
Size:
2094080
|
Author:
lclc88com
|
Hits:
Sign UP
Help
Support
What's CodeBus
SiteMap
Contact us
CodeBus www.codebus.net
“CodeBus” is the largest source code store in internet!
1999-2018
CodeBus
All Rights Reserved.