Skip to content

ningcol/ExportDataToExcel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#ExportDataToExcel

Platforms

==============

导出Excel操作

img

导出Excel样式

demo

##Purpose

ExportDataToExcel 是一个导出数组至Excel的Demo。

  • 在开发时有时候会遇到把tableView等数据导出来统计。
  • Demo中需要下载LibXL.framework

Installation

  1. 下载LibXL.framework
  2. 把LibXL.framework 拖入项目

##Description

self.nameArray = @[@"ningcol",@"张三",@"李四",@"王五"];
self.sexArray = @[@"",@"",@"",@""];
self.schoolArray = @[@"北京大学",@"清华大学",@"复旦大学",@"家里蹲大学"];
self.phoneArray = @[@"18345453452",@"13045453333",@"13845451112",@"180451111"];
  SheetHandle sheet = xlBookAddSheet(book, "Sheet1", NULL);
  //第一个参数代表插入哪个表,第二个是第几行(默认从0开始),第三个是第几列(默认从0开始)
  xlSheetWriteStr(sheet, 1, 0, "姓名", 0);
  xlSheetWriteStr(sheet, 1, 1, "性别", 0);
  xlSheetWriteStr(sheet, 1, 2, "学校", 0);
  xlSheetWriteStr(sheet, 1, 3, "电话", 0)

About

iOS 导出数组数据到Excel

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published