社区
茶馆
帖子详情
怎样样将StringGrid 控件内的数据保存到*.txt,*.xls中
liujl9754
2002-03-22 10:19:38
保存到*.txt文件,但是怎么保存为*.xls文件.我是了很多方法还是不行,帮忙一下.
...全文
133
2
打赏
收藏
怎样样将StringGrid 控件内的数据保存到*.txt,*.xls中
保存到*.txt文件,但是怎么保存为*.xls文件.我是了很多方法还是不行,帮忙一下.
复制链接
扫一扫
分享
转发到动态
举报
AI
作业
写回复
配置赞助广告
用AI写文章
2 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
40Star
2002-03-22
打赏
举报
回复
StringGrid1->Rows->SaveToFile
kingcaiyao
2002-03-22
打赏
举报
回复
please see the following code:
//define in header file
#define OlePropertySet PS
#define OlePropertyGet PG
#define OleFunction FN
#define OleProcedure PR
.cpp File
void __fastcall TForm1::Button1Click(TObject *Sender)
{
Variant V,WB1,SH1;
V=Variant::CreateObject("Excel.Application");
V.PS("Visible",true);
V.PG("WorkBooks").PR("Open","c:\\Chenbin\\BCB\\Excel\\Book1.xls");
WB1=V.PG("ActiveWorkBook");
SH1=WB1.PG("ActiveSheet");
CCEdit1->Text=SH1.PG("Cells",1,1).PG("Value");
for(int i=1;i<=RowCount;i++)
{
for(int j=1;j<=ColCount;j++)
{SH.PG("Cells",i,j).PS("Value",StringGrid->Cells[i-1][j-1]);
}
}
V.PR("Save");
//V.FN("Close");
V.PR("Quit");
V=Unassigned;
WB1=Unassigned;
SH1=Unassigned;
ShowMessage("The Excel application has been opened by BCB");
}
String
Grid
导出到EXcel
使用C++ builder6,
String
Grid
导出到EXcel,导出新的excel文件或者模板。两个程序的代码在文档
中
Delphi_从DB
Grid
,
String
Grid
导出Excel
Delphi_从DB
Grid
,
String
Grid
导出Excel
c++builder
中
使用adv
string
grid
导出
数据
到excel
c++builder adv
string
grid
导出
数据
excel c++builder
中
使用adv
string
grid
导出
数据
到excel
报表票据打印/建立SQL查询条件/
数据
功能扩张
该套
控件
操作极其简单,使用极其灵活,功能极其强大,可极大的提高软件开发速度。1、打印
控件
: 针对票据(无),表格(TDataSet,
String
Grid
),文件(T
String
s)而设计,可自由设置打印样式。2、报表设计器:wydReport.exe3、查询条件建立
控件
: 可建立含SQL条件4、LuckJump1
数据
功能扩张,含显示设置、
数据
查询、快速浏览、分组汇总、导出
数据
(.
xls
.htm .cvs .
txt
)
BCB读取EXCEL文件实例
BCB读取EXCEL文件实例,直接从EXCEL里面读取出信息并显示出来!
茶馆
551
社区成员
20,048
社区内容
发帖
与我相关
我的任务
茶馆
C++ Builder 茶馆
复制链接
扫一扫
分享
社区描述
C++ Builder 茶馆
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章